Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (controlboard == 0) { //need code to powersave display
- ControlError();
- }
- if (controlboard == 1) {
- DisplayIdle();
- }
- void ControlError() {
- if (error = 0) {
- oled.clearBuffer();
- error = 1;
- idle = 0;
- }
- else {
- oled.setFont(u8g2_font_helvB14_tf);
- oled.setFontPosTop();
- oled.drawStr(25, 1, "Warning:");
- oled.drawStr(31, 25, "Control");
- oled.drawStr(34, 49, "Offline");
- oled.sendBuffer();
- }
- }
- void DisplayIdle() {
- if (idle == 0) {
- oled.clearBuffer();
- }
- else {
- oled.setFontPosTop();
- oled.setFont(u8g2_font_helvB14_tf);
- oled.drawStr(44, 2, "Wifi");
- oled.drawStr(1, 23, "Dishwasher");
- oled.drawStr(42, 45, "v1.0");
- oled.sendBuffer();
- //CheckSignal();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement