Skip to content

Commit

Permalink
Merge pull request #105 from Knifa/dim-on-screensaver
Browse files Browse the repository at this point in the history
Add option to dim display slightly on screensaver
  • Loading branch information
sheaivey authored Dec 12, 2016
2 parents 7c458b6 + c9cebaa commit 108bd88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/rx5808-pro-diversity/oled_128x64_adafruit_screens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/rx5808-pro-diversity/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 108bd88

Please sign in to comment.