Repository navigation
Fix OLED input selection for low-voltage solar configurations - #143
Open
Solarboaters wants to merge 2 commits into
Open
Solarboaters wants to merge 2 commits into
Solarboaters wants to merge 2 commits into
Conversation
This branch has not been deployed
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.
With CONFIG_UEXT_OLED_DISPLAY=y and CONFIG_LV_TERMINAL_SOLAR=y, oled_update() does not select solar_terminal. If the HV terminal is a battery, compilation fails because in_terminal is undeclared. If the HV terminal is a nanogrid, it instead selects grid_terminal and displays grid power, voltage and daily energy in the solar input fields.
Include CONFIG_LV_TERMINAL_SOLAR in the existing solar-input condition. Both LV solar combinations are permitted by app/Kconfig, and setup.cpp already maps solar_terminal to lv_terminal for this configuration.
Validation: compiled and ran the actual extracted oled_update() function in a host C++ harness with simulated display and terminal interfaces. Before the fix, LV solar + HV battery failed to compile and LV solar + HV nanogrid displayed the wrong terminal. After the fix, both selected solar readings correctly. Existing HV solar, PWM solar and nanogrid-only selections also passed. Distinct solar (123 W) and grid (789 W) inputs verified the selected data. git diff --check passed.
This is an isolated function test. The full Zephyr firmware build and physical OLED hardware have not been tested.
Evidence audit — 17 November 2026
Public revision
15a2c0anow includestests/host/test_oled.py. Runpython3 tests/host/test_oled.pywith g++ installed. Five display configurations pass, including low-voltage solar with either high-voltage battery or grid. The old source either failed to compile in the former configuration or displayed grid power in the latter.The harness compiles the actual production function with hardware/display stand-ins. It is not a firmware or physical-device test. The combined native Zephyr suite also passes 103 tests, but this native configuration does not exercise this display/LED function; only the stated host harness does.