Skip to content

Commit 1d9d83b

Browse files
authored
Merge branch 'master' into feature/energypreferences
2 parents 94ef83b + 9f1c159 commit 1d9d83b

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

examples/platform/silabs/BaseApplication.cpp

+10-5
Original file line numberDiff line numberDiff line change
@@ -458,11 +458,7 @@ void BaseApplication::ButtonHandler(AppEvent * aEvent)
458458
// - Cycle LCD screen
459459
CancelFunctionTimer();
460460

461-
OutputQrCode(false);
462-
#ifdef DISPLAY_ENABLED
463-
UpdateLCDStatusScreen();
464-
slLCD.CycleScreens();
465-
#endif
461+
AppTask::GetAppTask().UpdateDisplay();
466462

467463
#ifdef SL_WIFI
468464
if (!ConnectivityMgr().IsWiFiStationProvisioned())
@@ -493,6 +489,15 @@ void BaseApplication::ButtonHandler(AppEvent * aEvent)
493489
}
494490
}
495491

492+
void BaseApplication::UpdateDisplay()
493+
{
494+
OutputQrCode(false);
495+
#ifdef DISPLAY_ENABLED
496+
UpdateLCDStatusScreen();
497+
slLCD.CycleScreens();
498+
#endif
499+
}
500+
496501
void BaseApplication::CancelFunctionTimer()
497502
{
498503
if (xTimerStop(sFunctionTimer, pdMS_TO_TICKS(0)) == pdFAIL)

examples/platform/silabs/BaseApplication.h

+5
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ class BaseApplication
105105
*/
106106
static void PostEvent(const AppEvent * event);
107107

108+
/**
109+
* @brief Overridable function used to update display on button press
110+
*/
111+
virtual void UpdateDisplay();
112+
108113
#ifdef DISPLAY_ENABLED
109114
/**
110115
* @brief Return LCD object

examples/platform/silabs/display/lcd.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class SilabsLCD
7171
void SetScreen(Screen_e screen);
7272
void CycleScreens(void);
7373
void SetStatus(DisplayStatus_t & status);
74+
void WriteStatus();
7475

7576
#ifdef QR_CODE_ENABLED
7677
void SetQRCode(uint8_t * str, uint32_t size);
@@ -85,7 +86,6 @@ class SilabsLCD
8586
} DemoState_t;
8687

8788
void WriteDemoUI();
88-
void WriteStatus();
8989

9090
#ifdef QR_CODE_ENABLED
9191
void WriteQRCode();

0 commit comments

Comments
 (0)