Browse Source

Make sure SerialLCD does not show a splash screen

Thomas Buck 3 years ago
parent
commit
cfb10e9620
3 changed files with 21 additions and 0 deletions
  1. 4
    0
      include/SerialLCD.h
  2. 1
    0
      src/Functionality.cpp
  3. 16
    0
      src/SerialLCD.cpp

+ 4
- 0
include/SerialLCD.h View File

20
     void clear(void);
20
     void clear(void);
21
     void setBacklight(uint8_t val);
21
     void setBacklight(uint8_t val);
22
     
22
     
23
+    void saveSplash(void);
24
+    void enableSplash(void);
25
+    void disableSplash(void);
26
+    
23
     // 0 no cursor, 1 underline, 2 blinking, 3 both
27
     // 0 no cursor, 1 underline, 2 blinking, 3 both
24
     void cursor(int style);
28
     void cursor(int style);
25
     
29
     

+ 1
- 0
src/Functionality.cpp View File

291
     debug.println("Setting up LCD, please wait");
291
     debug.println("Setting up LCD, please wait");
292
     delay(1000); // give LCD some time to boot
292
     delay(1000); // give LCD some time to boot
293
     lcd.init();
293
     lcd.init();
294
+    lcd.disableSplash();
294
     
295
     
295
 #ifdef DEBUG_WAIT_FOR_SERIAL_CONN
296
 #ifdef DEBUG_WAIT_FOR_SERIAL_CONN
296
     lcd.write(0, "Waiting for serial");
297
     lcd.write(0, "Waiting for serial");

+ 16
- 0
src/SerialLCD.cpp View File

1
+// see https://github.com/sparkfun/SparkFun_SerLCD_Arduino_Library
2
+
1
 #include <Arduino.h>
3
 #include <Arduino.h>
2
 #include "SerialLCD.h"
4
 #include "SerialLCD.h"
3
 
5
 
83
     delay(LCD_DELAY);
85
     delay(LCD_DELAY);
84
 }
86
 }
85
 
87
 
88
+void SerialLCD::saveSplash(void) {
89
+    lcd->write(0x7C);
90
+    lcd->write(0x0A);
91
+}
92
+
93
+void SerialLCD::enableSplash(void) {
94
+    lcd->write(0x7C);
95
+    lcd->write(0x30);
96
+}
97
+
98
+void SerialLCD::disableSplash(void) {
99
+    lcd->write(0x7C);
100
+    lcd->write(0x31);
101
+}
86
 void SerialLCD::write(const char *text) {
102
 void SerialLCD::write(const char *text) {
87
     lcd->print(text);
103
     lcd->print(text);
88
     delay(LCD_DELAY);
104
     delay(LCD_DELAY);

Loading…
Cancel
Save