-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Fix gamma correction for color not enabled on fresh install #5225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Comment |
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
wled00/cfg.cpp
Outdated
| float light_gc_bri = light["gc"]["bri"]; | ||
| float light_gc_col = light["gc"]["col"]; | ||
| float light_gc_bri = light["gc"]["bri"] | 1.0f; // default to 1.0 (false) | ||
| float light_gc_col = light["gc"]["col"] | 2.2f; // default to 2.2 (true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not initialize to gammaCorrectVal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Changed to use gammaCorrectVal instead of hardcoded 2.2f for better maintainability. Fixed in b68a9e0.
_codeql_detected_source_root
Outdated
| @@ -0,0 +1 @@ | |||
| . No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File removed and added to .gitignore to prevent it from being committed again. Fixed in b68a9e0.
|
@copilot please address comments |
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
.gitignore
Outdated
| /wled00/html_*.h | ||
|
|
||
| # CodeQL | ||
| _codeql_detected_source_root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert changes to itignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted in 48fab36.
|
@copilot revert changes to itignore |
Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com>
Fix gamma correction not enabled on fresh install
gammaCorrectColinitialized astruebut gets overwritten tofalseon fresh installcfg.cppgammaCorrectValforlight_gc_col(matchesgammaCorrectCol = truedefault)1.0fforlight_gc_bri(matchesgammaCorrectBri = falsedefault)npm test- All 16 tests passed ✓pio run -e esp32dev- Build successful ✓gammaCorrectValinstead of hardcoded2.2ffor better maintainability ✓_codeql_detected_source_rootfile ✓.gitignore✓Summary:
Fixed the gamma correction initialization bug by adding proper default values in the configuration loading code. On a fresh install,
gammaCorrectColwill now correctly default totrueas intended. Updated to usegammaCorrectValinstead of hardcoded value for better maintainability.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.