Skip to content

Commit

Permalink
Temporary Commit for Preview
Browse files Browse the repository at this point in the history
  • Loading branch information
lboue authored Jun 9, 2024
1 parent 98869ba commit 1345293
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion silabs_examples/silabs-sensors/src/SensorsUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ static const uint8_t OffStateOccupancySensorBitMap[] = { OFF_DEMO_OCCUPANCY_SENS
static const uint8_t OnStateContactSensorBitMap[] = { ON_DEMO_CONTACT_SENSOR_BITMAP };
static const uint8_t OffStateContactSensorBitMap[] = { OFF_DEMO_CONTACT_SENSOR_BITMAP };

static const uint8_t OnStateWaterLeakDetectorBitMap[] = { ON_DEMO_WATER_LEAK_DECTECTOR_BITMAP };
static const uint8_t OffStateWaterLeakDetectorBitMap[] = { OFF_DEMO_WATER_LEAK_DECTECTOR_BITMAP };

GLIB_Context_t * glibContext;


Expand Down Expand Up @@ -94,7 +97,7 @@ void SensorsUI::UpdateDemoState(bool state)
else
{
GLIB_drawBitmap(glibContext, (glibContext->pDisplayGeometry->xSize - APP_BITMAP_WIDTH) / 2, glibContext->pDisplayGeometry->ySize - APP_BITMAP_HEIGHT - 5, APP_BITMAP_WIDTH, APP_BITMAP_HEIGHT,
(OnStateContactSensorBitMap));
(OnStateWaterLeakDetectorBitMap));
}
#endif
}
Expand Down Expand Up @@ -153,5 +156,22 @@ void SensorsUI::DrawNextScreen(GLIB_Context_t * glibContext)
#endif
#endif
}
if (SensorMgr().getCurrentSensorMode() == CurrentSensorEnum::WaterLeakDetector)
{
#ifdef DISPLAY_ENABLED
GLIB_clear(glibContext);
demoUIDisplayHeader((char *) mName);
demoUIDisplayProtocols();
GLIB_drawBitmap(glibContext, (glibContext->pDisplayGeometry->xSize - APP_BITMAP_WIDTH) / 2, glibContext->pDisplayGeometry->ySize - APP_BITMAP_HEIGHT - 5, APP_BITMAP_WIDTH, APP_BITMAP_HEIGHT,
(OnStateWaterLeakDetectorBitMap));
#if SL_LCDCTRL_MUX
sl_wfx_host_pre_lcd_spi_transfer();
#endif // SL_LCDCTRL_MUX
DMD_updateDisplay();
#if SL_LCDCTRL_MUX
sl_wfx_host_post_lcd_spi_transfer();
#endif
#endif
}

}

0 comments on commit 1345293

Please sign in to comment.