Skip to content

Include Nextion code, increase test coverage#178

Merged
k3ldar merged 11 commits intomainfrom
AddNextion
Apr 18, 2026
Merged

Include Nextion code, increase test coverage#178
k3ldar merged 11 commits intomainfrom
AddNextion

Conversation

@k3ldar
Copy link
Copy Markdown
Owner

@k3ldar k3ldar commented Apr 18, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 18, 2026 06:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands SmartFuseBox firmware support for Nextion-based UI pages and new configuration surfaces (pins, RTC, external sensors), and extends the repository’s command-driven test datasets to cover the new config commands.

Changes:

  • Adds Nextion display page framework (page classes, navigation controller, Nextion config command handler) and integrates it into SmartFuseBoxApp.
  • Introduces new config fields + commands for tone pin (C6), RGB pins (C8), RTC pins (C18), Nextion config (N0–N6), and external sensor config (E0–E4), including config migration to v6.
  • Extends test command datasets for serial and WiFi config endpoints to cover the new commands.

Reviewed changes

Copilot reviewed 103 out of 104 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
TestData/test-commands.txt Adds serial test cases for C6/C8/C18, Nextion N0–N6, and external sensor E0–E4.
TestData/test-commands-wifi.txt Adds WiFi REST test cases for C6/C8/C18, Nextion N*, and /api/externalsensor E* routes.
SmartFuseBox/WarningType.h Adds Nextion config warning bit + string update.
SmartFuseBox/WarningManager.h Refactors WarningManager API (removes heartbeat/link responsibilities).
SmartFuseBox/SystemDefinitions.h Reassigns config command IDs (C6/C8/C18/C19) and adds N* and E* command constants.
SmartFuseBox/SystemCommandHandler.cpp Removes conditional compilation guard around RTC diagnostic handling.
SmartFuseBox/SunCalculator.h Adds sunrise/sunset calculation API.
SmartFuseBox/SunCalculator.cpp Implements sunrise/sunset calculations.
SmartFuseBox/SoundCommandHandler.h Removes link serial broadcast dependency from sound handler.
SmartFuseBox/SoundCommandHandler.cpp Removes link serial broadcast logic from sound handler.
SmartFuseBox/SmartFuseBoxApp.h Integrates Nextion/external sensor handlers; adds GPS serial injection and adjusts handler capacity.
SmartFuseBox/SmartFuseBoxApp.cpp Removes link serial usage; initializes Nextion; builds remote sensors from config; wires new handlers/network handler.
SmartFuseBox/SmartFuseBox.ino Updates sketch wiring (single command manager, GPS serial) and adds Nextion debug hook.
SmartFuseBox/SensorFactory.h Adds GPS sensor creation via injected GPS serial stream.
SmartFuseBox/SensorConfigCommandHandler.h Removes link serial broadcasting from sensor config handler.
SmartFuseBox/SensorCommandHandler.h Switches handler base to Nextion-aware base; injects Nextion control when enabled.
SmartFuseBox/SensorCommandHandler.cpp Updates Nextion notification paths and removes controller-specific compilation branches.
SmartFuseBox/ScreenDemoHandler.h Adds optional screen demo command handler for Nextion page cycling.
SmartFuseBox/SDCardConfigLoader.h Removes link serial sync support from SD config loader API/docs.
SmartFuseBox/SDCardConfigLoader.cpp Removes link serial sync implementation after SD config load.
SmartFuseBox/RtcDS1302Driver.h Adds DS1302 RTC abstraction with runtime pin initialization.
SmartFuseBox/RtcDS1302Driver.cpp Implements DS1302 RTC driver (begin/read/write/diagnostics).
SmartFuseBox/RgbLedFade.h Adds RGB fade LED helper driven by config + warning/day-night state.
SmartFuseBox/RelayCommandHandler.h Removes link serial broadcast dependency from relay handler.
SmartFuseBox/RelayCommandHandler.cpp Removes link serial broadcast logic from relay handler.
SmartFuseBox/Phonetic.h Adds phonetic conversion API (NATO-style).
SmartFuseBox/Phonetic.cpp Implements phonetic conversion with PROGMEM table.
SmartFuseBox/PageWarning.h Adds Nextion warning page.
SmartFuseBox/PageWarning.cpp Implements warning list rendering with caching + update throttling.
SmartFuseBox/PageVhfRadio.h Adds Nextion VHF radio info page.
SmartFuseBox/PageVhfRadio.cpp Implements VHF info page rendering + navigation buttons.
SmartFuseBox/PageVhfDistress.h Adds Nextion VHF distress helper page.
SmartFuseBox/PageVhfDistress.cpp Implements distress script text + GPS formatting with live updates.
SmartFuseBox/PageVhfChannels.h Adds Nextion VHF channels placeholder page.
SmartFuseBox/PageVhfChannels.cpp Implements channels placeholder page navigation.
SmartFuseBox/PageSystem.h Adds Nextion system stats page.
SmartFuseBox/PageSystem.cpp Implements system stats rendering + refresh cadence.
SmartFuseBox/PageSplash.h Adds Nextion splash page that seeds global Nextion variables from config.
SmartFuseBox/PageSoundSignals.h Adds Nextion sound signals hub page.
SmartFuseBox/PageSoundSignals.cpp Implements sound signals hub interactions and cancel state UI.
SmartFuseBox/PageSoundOvertaking.h Adds Nextion overtaking signals page.
SmartFuseBox/PageSoundOvertaking.cpp Implements overtaking sound button actions.
SmartFuseBox/PageSoundOther.h Adds Nextion “other” sound page.
SmartFuseBox/PageSoundOther.cpp Implements “other” sound actions.
SmartFuseBox/PageSoundManeuvering.h Adds Nextion maneuvering signals page.
SmartFuseBox/PageSoundManeuvering.cpp Implements maneuvering sound button actions.
SmartFuseBox/PageSoundFog.h Adds Nextion fog signals page.
SmartFuseBox/PageSoundFog.cpp Implements fog horn sound trigger.
SmartFuseBox/PageSoundEmergency.h Adds Nextion emergency sound page.
SmartFuseBox/PageSoundEmergency.cpp Implements SOS trigger.
SmartFuseBox/PageSettings.h Adds Nextion settings page scaffold.
SmartFuseBox/PageRelaySettings.h Adds Nextion relay settings page scaffold.
SmartFuseBox/PageRelay.h Adds Nextion relay control page.
SmartFuseBox/PageRelay.cpp Implements relay button mapping + state sync with controller.
SmartFuseBox/PageMoonPhase.h Adds Nextion moon phase page.
SmartFuseBox/PageMoonPhase.cpp Implements moon phase rendering + auto-return behavior.
SmartFuseBox/PageHome.h Adds Nextion home page header and state caching fields.
SmartFuseBox/PageFlags.h Adds Nextion nautical flags page.
SmartFuseBox/PageFlags.cpp Implements flags browsing + meanings stored in PROGMEM.
SmartFuseBox/PageEnvironment.h Adds Nextion environment page header.
SmartFuseBox/PageCardinalMarkers.h Adds Nextion cardinal markers page.
SmartFuseBox/PageCardinalMarkers.cpp Implements cardinal markers placeholder navigation.
SmartFuseBox/PageBuoys.h Adds Nextion buoys page.
SmartFuseBox/PageBuoys.cpp Implements buoy browsing + meanings stored in PROGMEM.
SmartFuseBox/PageAbout.h Adds Nextion about page.
SmartFuseBox/PageAbout.cpp Implements about page navigation buttons.
SmartFuseBox/NextionIds.h Defines Nextion page IDs and image/button constants.
SmartFuseBox/NextionConfigCommandHandler.h Adds N0–N6 config command handler for Nextion settings.
SmartFuseBox/NavigationController.h Adds Nextion navigation controller interface/implementation.
SmartFuseBox/NavigationController.cpp Implements page list building + next/prev navigation with location filtering.
SmartFuseBox/Local.h Changes local build-time feature flags; enables Nextion display define.
SmartFuseBox/INavigationDelegate.h Adds navigation delegate interface for pages.
SmartFuseBox/GpsSensorHandler.h Adjusts GPS handler update signature and adds MQTT channel support; enlarges ISO buffer.
SmartFuseBox/ExternalSensorNetworkHandler.h Adds WiFi REST handler for external sensor configuration.
SmartFuseBox/ExternalSensorNetworkHandler.cpp Implements /api/externalsensor routing + JSON formatting.
SmartFuseBox/Environment.h Adds dew point / condensation risk helpers.
SmartFuseBox/DateTimeManager.h Changes RTC init to accept runtime pin config; removes compile-flag gating.
SmartFuseBox/DateTimeManager.cpp Implements runtime RTC init and RTC-backed setDateTime persistence.
SmartFuseBox/ConfigManager.h Adds V5→V6 migration declaration.
SmartFuseBox/ConfigController.h Adds setters for new pin/Nextion configuration fields.
SmartFuseBox/ConfigController.cpp Implements setters and validates Nextion UART num.
SmartFuseBox/ConfigCommandHandler.cpp Adds C6/C8/C18 handling and broadcasts Nextion config via N* on C1.
SmartFuseBox/Config.h Bumps config version to v6 and adds new config structs/fields.
SmartFuseBox/BroadcastManager.h Simplifies broadcast manager to single serial target (computer).
SmartFuseBox/BroadcastManager.cpp Removes link serial broadcast and periodic updates.
SmartFuseBox/BasePage.h Adds Nextion page base class with navigation delegate + update types.
SmartFuseBox/BasePage.cpp Implements base page config binding and button color selection.
SmartFuseBox/BaseNextionCommandHandler.h Adds command handler base that can notify the current Nextion page.
SmartFuseBox/BaseNextionCommandHandler.cpp Implements BaseNextionCommandHandler ctor wiring.
SmartFuseBox/Astronomy.h Adds moon phase calculations + PROGMEM phase text helpers.
SmartFuseBox/AckCommandHandler.h Switches ACK handler base to Nextion-aware base + injects Nextion control.
SmartFuseBox/AckCommandHandler.cpp Refactors ACK handling branches for Nextion vs non-Nextion builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread SmartFuseBox/SmartFuseBox.ino Outdated
Comment thread SmartFuseBox/Local.h
Comment thread SmartFuseBox/RtcDS1302Driver.cpp
Comment thread SmartFuseBox/RtcDS1302Driver.cpp Outdated
Comment thread SmartFuseBox/PageRelay.cpp
Comment thread SmartFuseBox/PageVhfRadio.cpp
Comment thread SmartFuseBox/SunCalculator.cpp
@k3ldar k3ldar merged commit bc6981a into main Apr 18, 2026
1 check passed
@k3ldar k3ldar deleted the AddNextion branch April 18, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants