Skip to content

inky: fix blend precision, height quirk, and minor cleanups#117

Open
caglar10ur wants to merge 1 commit into
periph:mainfrom
caglar10ur:blend
Open

inky: fix blend precision, height quirk, and minor cleanups#117
caglar10ur wants to merge 1 commit into
periph:mainfrom
caglar10ur:blend

Conversation

@caglar10ur
Copy link
Copy Markdown
Contributor

  • Fix color blending truncation in blend(): compute the full weighted sum as float64 before casting to uint8, avoiding double truncation
  • Fix UC8159 on IMPRESSION57 incorrectly reporting height as 447; correct it to 448 in DetectOpts
  • Add Opts.String() for human-readable option printing
  • Refactor update() if/else chain to a switch statement
  • Add TestDevImpression_BlendPrecision to cover the blend fix

  - Fix color blending truncation in blend(): compute the full weighted
    sum as float64 before casting to uint8, avoiding double truncation
  - Fix UC8159 on IMPRESSION57 incorrectly reporting height as 447;
    correct it to 448 in DetectOpts
  - Add Opts.String() for human-readable option printing
  - Refactor update() if/else chain to a switch statement
  - Add TestDevImpression_BlendPrecision to cover the blend fix

Signed-off-by: Çağlar Onur <caglar@10ur.org>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

❌ Patch coverage is 30.76923% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.7%. Comparing base (1752d1b) to head (89a9731).

Files with missing lines Patch % Lines
inky/impression.go 44.4% 5 Missing ⚠️
inky/opts.go 0.0% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #117     +/-   ##
=======================================
+ Coverage   52.6%   52.7%   +0.1%     
=======================================
  Files        117     117             
  Lines      11801   11803      +2     
=======================================
+ Hits        6205    6220     +15     
+ Misses      5232    5218     -14     
- Partials     364     365      +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant