@@ -108,21 +108,21 @@ void Wippersnapper_V2::provision() {
108108 // Initialize the display
109109 displayConfig config;
110110 WsV2._fileSystemV2 ->parseDisplayConfig (config);
111- WsV2._display = new ws_display_driver (config);
111+ WsV2._displayV2 = new ws_display_driver (config);
112112 // Begin display
113- if (!WsV2._display ->begin ()) {
113+ if (!WsV2._displayV2 ->begin ()) {
114114 WS_DEBUG_PRINTLN (" Unable to enable display driver and LVGL" );
115115 haltErrorV2 (" Unable to enable display driver, please check the json "
116116 " configuration!" );
117117 }
118118
119- WsV2._display ->enableLogging ();
119+ WsV2._displayV2 ->enableLogging ();
120120 ReleaseStatusPixel (); // don't use status LED if we are using the display
121121 // UI Setup
122- WsV2._ui_helper = new ws_display_ui_helper (WsV2._display );
123- WsV2._ui_helper ->set_bg_black ();
124- WsV2._ui_helper ->show_scr_load ();
125- WsV2._ui_helper ->set_label_status (" Validating Credentials..." );
122+ WsV2._ui_helperV2 = new ws_display_ui_helper (WsV2._displayV2 );
123+ WsV2._ui_helperV2 ->set_bg_black ();
124+ WsV2._ui_helperV2 ->show_scr_load ();
125+ WsV2._ui_helperV2 ->set_label_status (" Validating Credentials..." );
126126#endif
127127
128128#ifdef USE_TINYUSB
@@ -139,8 +139,8 @@ void Wippersnapper_V2::provision() {
139139 set_ssid_pass ();
140140
141141#ifdef USE_DISPLAY
142- WsV2._ui_helper ->set_label_status (" " );
143- WsV2._ui_helper ->set_load_bar_icon_complete (loadBarIconFile);
142+ WsV2._ui_helperV2 ->set_label_status (" " );
143+ WsV2._ui_helperV2 ->set_load_bar_icon_complete (loadBarIconFile);
144144#endif
145145}
146146
@@ -515,7 +515,7 @@ void cbErrorTopicV2(char *errorData, uint16_t len) {
515515 }
516516
517517#ifdef USE_DISPLAY
518- WsV2._ui_helper ->show_scr_error (" IO Ban Error" , errorData);
518+ WsV2._ui_helperV2 ->show_scr_error (" IO Ban Error" , errorData);
519519#endif
520520
521521 // WDT reset
@@ -554,7 +554,7 @@ void cbThrottleTopicV2(char *throttleData, uint16_t len) {
554554 buffer, 100 ,
555555 " [IO ERROR] Device is throttled for %d mS and blocking execution..\n ." ,
556556 throttleDuration);
557- WsV2._ui_helper ->add_text_to_terminal (buffer);
557+ WsV2._ui_helperV2 ->add_text_to_terminal (buffer);
558558#endif
559559
560560 // If throttle duration is less than the keepalive interval, delay for the
@@ -574,7 +574,7 @@ void cbThrottleTopicV2(char *throttleData, uint16_t len) {
574574 }
575575 WS_DEBUG_PRINTLN (" Device is un-throttled, resumed command execution" );
576576#ifdef USE_DISPLAY
577- WsV2._ui_helper ->add_text_to_terminal (
577+ WsV2._ui_helperV2 ->add_text_to_terminal (
578578 " [IO] Device is un-throttled, resuming...\n " );
579579#endif
580580}
@@ -784,8 +784,8 @@ void Wippersnapper_V2::runNetFSMV2() {
784784 if (networkStatus () == WS_NET_CONNECTED) {
785785 WS_DEBUG_PRINTLN (" Connected to WiFi!" );
786786#ifdef USE_DISPLAY
787- if (WsV2._ui_helper ->getLoadingState ())
788- WsV2._ui_helper ->set_load_bar_icon_complete (loadBarIconWifi);
787+ if (WsV2._ui_helperV2 ->getLoadingState ())
788+ WsV2._ui_helperV2 ->set_load_bar_icon_complete (loadBarIconWifi);
789789#endif
790790 fsmNetwork = FSM_NET_ESTABLISH_MQTT;
791791 break ;
@@ -796,15 +796,15 @@ void Wippersnapper_V2::runNetFSMV2() {
796796 WS_DEBUG_PRINTLN (" Establishing network connection..." );
797797 WS_PRINTER.flush ();
798798#ifdef USE_DISPLAY
799- if (WsV2._ui_helper ->getLoadingState ())
800- WsV2._ui_helper ->set_label_status (" Connecting to WiFi..." );
799+ if (WsV2._ui_helperV2 ->getLoadingState ())
800+ WsV2._ui_helperV2 ->set_label_status (" Connecting to WiFi..." );
801801#endif
802802 // Perform a WiFi scan and check if SSID within
803803 // secrets.json is within the scanned SSIDs
804804 WS_DEBUG_PRINT (" Performing a WiFi scan for SSID..." );
805805 if (!check_valid_ssid ()) {
806806#ifdef USE_DISPLAY
807- WsV2._ui_helper ->show_scr_error (" ERROR" ,
807+ WsV2._ui_helperV2 ->show_scr_error (" ERROR" ,
808808 " Unable to find WiFi network listed in "
809809 " the secrets file. Rebooting soon..." );
810810#endif
@@ -834,7 +834,7 @@ void Wippersnapper_V2::runNetFSMV2() {
834834 if (networkStatus () != WS_NET_CONNECTED) {
835835 WS_DEBUG_PRINTLN (" ERROR: Unable to connect to WiFi!" );
836836#ifdef USE_DISPLAY
837- WsV2._ui_helper ->show_scr_error (
837+ WsV2._ui_helperV2 ->show_scr_error (
838838 " CONNECTION ERROR" ,
839839 " Unable to connect to WiFi Network. Please check that you entered "
840840 " the WiFi credentials correctly. Rebooting in 5 seconds..." );
@@ -847,8 +847,8 @@ void Wippersnapper_V2::runNetFSMV2() {
847847 break ;
848848 case FSM_NET_ESTABLISH_MQTT:
849849#ifdef USE_DISPLAY
850- if (WsV2._ui_helper ->getLoadingState ())
851- WsV2._ui_helper ->set_label_status (" Connecting to IO..." );
850+ if (WsV2._ui_helperV2 ->getLoadingState ())
851+ WsV2._ui_helperV2 ->set_label_status (" Connecting to IO..." );
852852#endif
853853 WsV2._mqttV2 ->setKeepAliveInterval (WS_KEEPALIVE_INTERVAL_MS / 1000 );
854854 // Attempt to connect
@@ -880,7 +880,7 @@ void Wippersnapper_V2::runNetFSMV2() {
880880 }
881881 if (fsmNetwork != FSM_NET_CHECK_MQTT) {
882882#ifdef USE_DISPLAY
883- WsV2._ui_helper ->show_scr_error (
883+ WsV2._ui_helperV2 ->show_scr_error (
884884 " CONNECTION ERROR" ,
885885 " Unable to connect to Adafruit.io. If you are repeatedly having "
886886 " this issue, please check that your IO Username and IO Key are set "
@@ -1126,12 +1126,12 @@ void Wippersnapper_V2::pingBrokerV2() {
11261126 if (WsV2._mqttV2 ->ping ()) {
11271127 WS_DEBUG_PRINTLN (" SUCCESS!" );
11281128#ifdef USE_DISPLAY
1129- WsV2._ui_helper ->add_text_to_terminal (" [NET] Sent KeepAlive ping!\n " );
1129+ WsV2._ui_helperV2 ->add_text_to_terminal (" [NET] Sent KeepAlive ping!\n " );
11301130#endif
11311131 } else {
11321132 WS_DEBUG_PRINTLN (" FAILURE! Running network FSM..." );
11331133#ifdef USE_DISPLAY
1134- WsV2._ui_helper ->add_text_to_terminal (
1134+ WsV2._ui_helperV2 ->add_text_to_terminal (
11351135 " [NET] EROR: Failed to send KeepAlive ping!\n " );
11361136#endif
11371137 WsV2._mqttV2 ->disconnect ();
@@ -1304,8 +1304,8 @@ void Wippersnapper_V2::connect() {
13041304 WsV2.feedWDTV2 ();
13051305
13061306#ifdef USE_DISPLAY
1307- WsV2._ui_helper ->set_load_bar_icon_complete (loadBarIconCloud);
1308- WsV2._ui_helper ->set_label_status (" Sending device info..." );
1307+ WsV2._ui_helperV2 ->set_load_bar_icon_complete (loadBarIconCloud);
1308+ WsV2._ui_helperV2 ->set_label_status (" Sending device info..." );
13091309#endif
13101310
13111311 WS_DEBUG_PRINTLN (" Performing checkin handshake..." );
@@ -1325,9 +1325,9 @@ void Wippersnapper_V2::connect() {
13251325// switch to monitor screen
13261326#ifdef USE_DISPLAY
13271327 WS_DEBUG_PRINTLN (" Clearing loading screen..." );
1328- WsV2._ui_helper ->clear_scr_load ();
1328+ WsV2._ui_helperV2 ->clear_scr_load ();
13291329 WS_DEBUG_PRINTLN (" building monitor screen..." );
1330- WsV2._ui_helper ->build_scr_monitor ();
1330+ WsV2._ui_helperV2 ->build_scr_monitor ();
13311331#endif
13321332 WS_DEBUG_PRINTLN (" Running app loop..." );
13331333}
0 commit comments