-
-
Notifications
You must be signed in to change notification settings - Fork 460
chore(color): implement publish/subscribe messaging to simplify code and further code consolidation #7032
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
pfeerick
left a comment
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.
Liking the code removal and consolidation! Now to find out how many bugs are hiding! 😆
| return confirmed; | ||
| } | ||
|
|
||
| //----------------------------------------------------------------------------- |
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.
What's the rationale behind these... I can understand at the end of long header lists or to logically divide sections of a file up, but at the end?
radio/src/main.cpp
Outdated
| if (UNEXPECTED_SHUTDOWN()) { | ||
| #if defined(COLORLCD) | ||
| drawFatalErrorScreen(STR_EMERGENCY_MODE); | ||
| backlightEnable(100); |
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.
Can we not use BACKLIGHT_LEVEL_MAX or BACKLIGHT_FORCED_ON here rather than magic numbers? And the other places where this has been done in this PR?
| if ((BACKLIGHT_LEVEL_MAX - g_eeGeneral.backlightBright) < g_eeGeneral.blOffBright) | ||
| g_eeGeneral.backlightBright = | ||
| BACKLIGHT_LEVEL_MAX - g_eeGeneral.blOffBright; | ||
| #endif |
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.
Naughty, naughty, this isn't cleanup! lol
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.
It's to catch any misalignments in old configs. It was being done in the UI code; but only if you edited the backlight settings.
42 |
Changes: