Tue, 10 Nov 2020 22:22:16 +0100
Add support for dimmed flag display
src/display.cpp | file | annotate | diff | comparison | revisions | |
src/display.h | file | annotate | diff | comparison | revisions |
--- a/src/display.cpp Tue Nov 10 22:21:35 2020 +0100 +++ b/src/display.cpp Tue Nov 10 22:22:16 2020 +0100 @@ -234,11 +234,14 @@ } -void Display::set_flag(uint8_t flag, bool show=true) +void Display::set_flag(uint8_t flag, bool show, bool dimm) { uint8_t i; uint8_t bgcolor = 0x00, fgcolor = 0xFF; + if (dimm) + fgcolor /= 2; + for (uint8_t l=0; l<(sizeof(flags)/sizeof(flags[0])); ++l) { if (flag == flags[l].flag)
--- a/src/display.h Tue Nov 10 22:21:35 2020 +0100 +++ b/src/display.h Tue Nov 10 22:22:16 2020 +0100 @@ -168,7 +168,7 @@ void dimm_char(uint8_t); void show_splashscreen(); void show_byescreen(); - void set_flag(uint8_t flag, bool show); + void set_flag(uint8_t flag, bool show=true, bool dimm=false); void show_flag(uint8_t flag) {set_flag(flag, true);}; void hide_flag(uint8_t flag) {set_flag(flag, false);}; void shift_on() {set_flag(0x80, true);};