Skip to content

Commit 817a6f3

Browse files
committed
Small example fix.
1 parent 32a57de commit 817a6f3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/esp8266WifiOled/esp8266WifiOled.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ void setup() {
118118
props.addGridPosition(&menuLockDoor, GridPosition(GridPosition::DRAW_AS_ICON_ONLY, GridPosition::JUSTIFY_CENTER_NO_VALUE, 3, 3, 3, 26));
119119
props.addGridPosition(&menuSetup, GridPosition(GridPosition::DRAW_AS_ICON_ONLY, GridPosition::JUSTIFY_CENTER_NO_VALUE, 3, 1, 3, 26));
120120

121+
// after changing the drawing properties, always refresh the cache to ensure it draws properly.
122+
tcgfx::ConfigurableItemDisplayPropertiesFactory::refreshCache();
123+
121124
// now monitor the wifi level every second and report it in a widget.
122125
taskManager.scheduleFixedRate(1000, [] {
123126
if(WiFi.status() == WL_CONNECTED) {

0 commit comments

Comments
 (0)