add functionality to display text
This commit is contained in:
parent
72b654bb7f
commit
50b2a11ec1
@ -81,6 +81,11 @@ namespace Display {
|
||||
clockDisplay.writeDisplay();
|
||||
}
|
||||
|
||||
void displayText(const char c[]) {
|
||||
clockDisplay.print(c);
|
||||
clockDisplay.writeDisplay();
|
||||
}
|
||||
|
||||
void setup() {
|
||||
clockDisplay.begin(DISPLAY_ADDRESS);
|
||||
clockDisplay.setBrightness(brightness);
|
||||
|
||||
12
include/ir.h
12
include/ir.h
@ -43,15 +43,21 @@ namespace Ir {
|
||||
Display::adjustTime();
|
||||
}
|
||||
|
||||
void displayText(const char c[]) {
|
||||
Display::tDisplay.disable();
|
||||
Display::displayText(c);
|
||||
Display::adjustTime();
|
||||
Display::tDisplay.enableDelayed(1000);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
if (readCommand()) {
|
||||
Display::tDisplay.setCallback(displayValue);
|
||||
Display::tDisplay.forceNextIteration();
|
||||
switch (lastCommand)
|
||||
{
|
||||
case 0x9F:
|
||||
avrOn = false;
|
||||
tCheckWifi.enable();
|
||||
displayText("off");
|
||||
break;
|
||||
case 0xC4:
|
||||
case 0xD0:
|
||||
@ -60,6 +66,8 @@ namespace Ir {
|
||||
Wifi::reconnect();
|
||||
break;
|
||||
default:
|
||||
Display::tDisplay.setCallback(displayValue);
|
||||
Display::tDisplay.forceNextIteration();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,9 +14,9 @@ board = d1_mini
|
||||
framework = arduino
|
||||
lib_deps =
|
||||
arduino-libraries/NTPClient@^3.1.0
|
||||
adafruit/Adafruit LED Backpack Library@^1.1.8
|
||||
adafruit/Adafruit GFX Library@^1.10.7
|
||||
adafruit/Adafruit BusIO@^1.6.0
|
||||
adafruit/Adafruit LED Backpack Library@^1.3.2
|
||||
adafruit/Adafruit GFX Library@^1.10.12
|
||||
adafruit/Adafruit BusIO@^1.9.8
|
||||
jchristensen/Timezone@^1.2.4
|
||||
ottowinter/AsyncMqttClient-esphome@^0.8.5
|
||||
crankyoldgit/IRremoteESP8266@^2.7.18
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user