Apply keypad brightness ratio immediately + drop dead UIStatus code#430
Merged
Conversation
The Settings > User Pref > "Key Bright" menu wrote keypad_brightness to config but never asked main to re-apply it, so the new ratio only took effect on the next display-brightness adjustment. Add an apply_brightness post_callback that signals the existing "set_brightness" handler in main, which re-reads keypad_brightness from config and updates the keypad PWM. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Remove the _config_options dict and all of its associated callbacks (set_key_brightness, set_sleep_timeout, set_hint_timeout, set_screen_off_timeout, mount_switch, side_switch, wifi_switch, shutdown, restart, update_software) along with the now-unused active() method and version_txt attribute. The hint-menu system that consumed _config_options no longer exists; nothing iterates the dict and the duplicate update_software shadowed the live implementation in ui/software.py. Keep the wifi_status.txt read that seeds status_dict["WIFI"], inlined as a local. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
keypad_brightnessratio immediately. The menu used the genericconfig_optionpath intext_menu.py, which only wrote to config and never signaled the main loop, so the new ratio didn't take effect until something else (e.g. ALT_+/ALT_-) re-triggeredmain.set_brightness. Added anapply_brightnesspost_callbackthat puts"set_brightness"on the ui_queue; the existing handler inmain.pyalready re-readskeypad_brightnessand updates the keypad PWM._config_optionshint-menu dict fromUIStatusand the ten unreferenced callbacks below it (update_software,set_key_brightness,set_sleep_timeout,set_hint_timeout,set_screen_off_timeout,mount_switch,side_switch,wifi_switch,shutdown,restart) plus theactive()method andversion_txtattr that only existed to feed the dead dict. Nothing iterates_config_optionsanywhere in the codebase, and the duplicatedupdate_softwareshadowed the live implementation inui/software.py. Preserved thewifi_status.txtread that seedsstatus_dict["WIFI"]. Net: −179 / +3 inui/status.py.Test plan
+3then-2) and confirm the keypad LEDs change immediately, without needing to also touch display brightness.🤖 Generated with Claude Code