From c9cebaa75c89b715f7e965377273559f0b566c88 Mon Sep 17 00:00:00 2001 From: Daniel Callander Date: Sat, 10 Dec 2016 07:35:34 +0000 Subject: [PATCH] Add option to dim display slightly on screensaver --- src/rx5808-pro-diversity/oled_128x64_adafruit_screens.cpp | 6 ++++++ src/rx5808-pro-diversity/settings.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/rx5808-pro-diversity/oled_128x64_adafruit_screens.cpp b/src/rx5808-pro-diversity/oled_128x64_adafruit_screens.cpp index 19e21366..7ba12fc1 100644 --- a/src/rx5808-pro-diversity/oled_128x64_adafruit_screens.cpp +++ b/src/rx5808-pro-diversity/oled_128x64_adafruit_screens.cpp @@ -121,6 +121,9 @@ char screens::begin(const char *call_sign) { } void screens::reset() { +#ifdef USE_DIM_ON_SCREENSAVER + display.dim(false); +#endif display.clearDisplay(); display.setCursor(0,0); display.setTextSize(1); @@ -423,6 +426,9 @@ void screens::screenSaver(uint8_t channelName, uint16_t channelFrequency, const } void screens::screenSaver(uint8_t diversity_mode, uint8_t channelName, uint16_t channelFrequency, const char *call_sign) { reset(); +#ifdef USE_DIM_ON_SCREENSAVER + display.dim(true); +#endif display.setTextSize(6); display.setTextColor(WHITE); display.setCursor(0,0); diff --git a/src/rx5808-pro-diversity/settings.h b/src/rx5808-pro-diversity/settings.h index ffa2aa2e..c74780ba 100644 --- a/src/rx5808-pro-diversity/settings.h +++ b/src/rx5808-pro-diversity/settings.h @@ -51,6 +51,7 @@ SOFTWARE. // Local laws may prohibit the use of these frequencies use at your own risk! //#define USE_LBAND #define USE_BOOT_CHECK +#define USE_DIM_ON_SCREENSAVER // Receiver Module version // used for tuning time