mirror of
https://github.com/lora-aprs/LoRa_APRS_Tracker.git
synced 2025-12-06 07:12:15 +01:00
Update display.cpp
This commit is contained in:
parent
feaf0ebbad
commit
d523e01c92
|
|
@ -9,16 +9,6 @@
|
||||||
|
|
||||||
Adafruit_SSD1306 display(128, 64, &Wire, OLED_RST);
|
Adafruit_SSD1306 display(128, 64, &Wire, OLED_RST);
|
||||||
|
|
||||||
void display_toggle(bool toggle) {
|
|
||||||
logPrintlnI("Toggling display");
|
|
||||||
logPrintlnI(toggle ? "On" : "Off");
|
|
||||||
if (toggle == false) {
|
|
||||||
display.ssd1306_command(SSD1306_DISPLAYOFF);
|
|
||||||
} else {
|
|
||||||
display.ssd1306_command(SSD1306_DISPLAYON);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// cppcheck-suppress unusedFunction
|
// cppcheck-suppress unusedFunction
|
||||||
void setup_display() {
|
void setup_display() {
|
||||||
pinMode(OLED_RST, OUTPUT);
|
pinMode(OLED_RST, OUTPUT);
|
||||||
|
|
@ -43,6 +33,17 @@ void setup_display() {
|
||||||
display.display();
|
display.display();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void display_toggle(bool toggle) {
|
||||||
|
logPrintI("Toggling display: ");
|
||||||
|
if (toggle) {
|
||||||
|
logPrintlnI("On");
|
||||||
|
display.ssd1306_command(SSD1306_DISPLAYON);
|
||||||
|
} else {
|
||||||
|
logPrintlnI("Off");
|
||||||
|
display.ssd1306_command(SSD1306_DISPLAYOFF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// cppcheck-suppress unusedFunction
|
// cppcheck-suppress unusedFunction
|
||||||
void show_display(String header, int wait) {
|
void show_display(String header, int wait) {
|
||||||
display.clearDisplay();
|
display.clearDisplay();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue