File tree 3 files changed +16
-6
lines changed
3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -458,11 +458,7 @@ void BaseApplication::ButtonHandler(AppEvent * aEvent)
458
458
// - Cycle LCD screen
459
459
CancelFunctionTimer ();
460
460
461
- OutputQrCode (false );
462
- #ifdef DISPLAY_ENABLED
463
- UpdateLCDStatusScreen ();
464
- slLCD.CycleScreens ();
465
- #endif
461
+ AppTask::GetAppTask ().UpdateDisplay ();
466
462
467
463
#ifdef SL_WIFI
468
464
if (!ConnectivityMgr ().IsWiFiStationProvisioned ())
@@ -493,6 +489,15 @@ void BaseApplication::ButtonHandler(AppEvent * aEvent)
493
489
}
494
490
}
495
491
492
+ void BaseApplication::UpdateDisplay ()
493
+ {
494
+ OutputQrCode (false );
495
+ #ifdef DISPLAY_ENABLED
496
+ UpdateLCDStatusScreen ();
497
+ slLCD.CycleScreens ();
498
+ #endif
499
+ }
500
+
496
501
void BaseApplication::CancelFunctionTimer ()
497
502
{
498
503
if (xTimerStop (sFunctionTimer , pdMS_TO_TICKS (0 )) == pdFAIL)
Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ class BaseApplication
105
105
*/
106
106
static void PostEvent (const AppEvent * event);
107
107
108
+ /* *
109
+ * @brief Overridable function used to update display on button press
110
+ */
111
+ virtual void UpdateDisplay ();
112
+
108
113
#ifdef DISPLAY_ENABLED
109
114
/* *
110
115
* @brief Return LCD object
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ class SilabsLCD
71
71
void SetScreen (Screen_e screen);
72
72
void CycleScreens (void );
73
73
void SetStatus (DisplayStatus_t & status);
74
+ void WriteStatus ();
74
75
75
76
#ifdef QR_CODE_ENABLED
76
77
void SetQRCode (uint8_t * str, uint32_t size);
@@ -85,7 +86,6 @@ class SilabsLCD
85
86
} DemoState_t;
86
87
87
88
void WriteDemoUI ();
88
- void WriteStatus ();
89
89
90
90
#ifdef QR_CODE_ENABLED
91
91
void WriteQRCode ();
You can’t perform that action at this time.
0 commit comments