firmware: scaffold optional cargo OLED display
This commit is contained in:
@@ -401,3 +401,27 @@ def test_embedded_webui_config_subtabs():
|
||||
assert "config-maintenance" in source
|
||||
assert "WiFi / AP" in source
|
||||
assert "subtabbtn active" in source
|
||||
|
||||
|
||||
def test_cargo_oled_support_is_optional():
|
||||
source = firmware_source()
|
||||
|
||||
assert "#define OLED_ENABLED 0" in source
|
||||
assert "#if OLED_ENABLED" in source
|
||||
assert "void oledBegin()" in source
|
||||
assert "void oledLoop()" in source
|
||||
assert "void oledShowSetupPage()" in source
|
||||
assert "OLED_I2C_ADDR = 0x3C" in source
|
||||
assert "Adafruit_SSD1306" in source
|
||||
|
||||
|
||||
def test_cargo_oled_shows_setup_and_service_pages():
|
||||
source = firmware_source()
|
||||
|
||||
assert 'oledClear("Setup / AP")' in source
|
||||
assert 'oledClear("Battery")' in source
|
||||
assert 'oledClear("Relays")' in source
|
||||
assert 'oledClear("Network")' in source
|
||||
assert 'oledClear("Alarms")' in source
|
||||
assert "oledShowSetupPage();" in source
|
||||
assert "oledLoop();" in source
|
||||
|
||||
Reference in New Issue
Block a user