Refactor LED management (#745)
-replace low power led by led info -enable to change the led ON value -go upper case for the led macros Also transform BLE connect warning to notice in log Add Sonoff RF Bridge LED
This commit is contained in:
1 parent
5e2d86e963
commit
7b9944d1ca
6 files changed
+86
-65
No files matched your search
+2
-2
@@ -215,7 +215,7 @@ void drawLogo(int logoSize, int circle1X, int circle1Y, bool circle1, bool circl
|
||||
}
|
||||
|
||||
void M5Display(char* line1, char* line2, char* line3) {
|
||||
if (low_power_mode == 2) digitalWrite(LOW_POWER_LED, 1 - LOW_POWER_LED_OFF);
|
||||
if (low_power_mode == 2) digitalWrite(LED_INFO, LED_INFO_ON);
|
||||
wakeScreen(NORMAL_LCD_BRIGHTNESS);
|
||||
M5.Lcd.fillScreen(TFT_WHITE);
|
||||
drawLogo(M5.Lcd.width() * 0.1875, (M5.Lcd.width() / 2) - M5.Lcd.width() * 0.24, M5.Lcd.height() * 0.5, true, true, true, true, true, true);
|
||||
@@ -224,6 +224,6 @@ void M5Display(char* line1, char* line2, char* line3) {
|
||||
M5.Lcd.drawString(line2, 5, M5.Lcd.height() * 0.8, 1);
|
||||
M5.Lcd.drawString(line3, 5, M5.Lcd.height() * 0.9, 1);
|
||||
delay(2000);
|
||||
digitalWrite(LOW_POWER_LED, LOW_POWER_LED_OFF); // to switch off no need of condition
|
||||
digitalWrite(LED_INFO, !LED_INFO_ON); // to switch off no need of condition
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user