Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _codeql_detected_source_root
4 changes: 2 additions & 2 deletions wled00/cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,8 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
CJSON(strip.autoSegments, light[F("aseg")]);

CJSON(gammaCorrectVal, light["gc"]["val"]); // default 2.2
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)
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

if (light_gc_bri > 1.0f) gammaCorrectBri = true;
else gammaCorrectBri = false;
if (light_gc_col > 1.0f) gammaCorrectCol = true;
Expand Down