|
|
@ -243,6 +243,8 @@ void WelcomeScreen::draw() { |
|
|
|
u8g2.clearBuffer(); // clear the internal memory
|
|
|
|
u8g2.setFont(u8g2_font_ncenB08_tr); // choose a suitable font
|
|
|
|
u8g2.drawStr(2,10,"esp32-node by hendrik"); // write something to the internal memory
|
|
|
|
// u8g2.setFont(u8g2_font_profont29_tr);
|
|
|
|
// u8g2.drawStr(2,10,"xd0");
|
|
|
|
if (iot.configuration.get("WifiConfigured") != "True") { |
|
|
|
u8g2.drawStr(2,30,"NOT CONFIGURED!"); |
|
|
|
u8g2.drawStr(12,40,"SSID: \"ESP32\""); |
|
|
@ -260,6 +262,19 @@ void WelcomeScreen::draw() { |
|
|
|
u8g2.sendBuffer(); // transfer internal memory to the display
|
|
|
|
} |
|
|
|
|
|
|
|
void Screen::drawStatusBar(uint8_t y_offset) { |
|
|
|
u8g2.setFont(u8g2_font_open_iconic_embedded_2x_t); |
|
|
|
u8g2.drawUTF8(0, y_offset, "\xab"); |
|
|
|
if (alarmclock.isAlarmArmed()) u8g2.drawGlyph(5, y_offset, 0x0041); // Alarmclock symbol
|
|
|
|
else {} |
|
|
|
u8g2.setFont(u8g2_font_inb16_mr); |
|
|
|
u8g2.drawUTF8(0, 20, state.timeStr); |
|
|
|
u8g2.setFont(u8g2_font_open_iconic_embedded_2x_t); |
|
|
|
u8g2.drawGlyph(5, y_offset, 0x0050); // Wifi symbol
|
|
|
|
if (state.voltage > 3000) u8g2.drawGlyph(5, y_offset, 0x0049); // Battery symbol
|
|
|
|
else u8g2.drawGlyph(5, y_offset, 0x0040); // Battery symbol
|
|
|
|
} |
|
|
|
|
|
|
|
void MainScreen::draw() { |
|
|
|
u8g2.clearBuffer(); // clear the internal memory
|
|
|
|
|
|
|
|