Optimised screenmute function
This commit is contained in:
+3
-5
@@ -3612,8 +3612,8 @@ void BuildMenu() {
|
|||||||
analogWrite(SMETERPIN, 0);
|
analogWrite(SMETERPIN, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MuteScreen(int setting) {
|
void MuteScreen(bool setting) {
|
||||||
if (setting == 0 && screenmute == 1) {
|
if (!setting && screenmute) {
|
||||||
screenmute = false;
|
screenmute = false;
|
||||||
setupmode = true;
|
setupmode = true;
|
||||||
tft.writecommand(0x11);
|
tft.writecommand(0x11);
|
||||||
@@ -3621,9 +3621,7 @@ void MuteScreen(int setting) {
|
|||||||
radio.clearRDS(fullsearchrds);
|
radio.clearRDS(fullsearchrds);
|
||||||
BuildDisplay();
|
BuildDisplay();
|
||||||
setupmode = false;
|
setupmode = false;
|
||||||
}
|
} else if (setting && !screenmute) {
|
||||||
|
|
||||||
if (setting == 1 && screenmute == 0) {
|
|
||||||
screenmute = true;
|
screenmute = true;
|
||||||
analogWrite(CONTRASTPIN, 0);
|
analogWrite(CONTRASTPIN, 0);
|
||||||
tft.writecommand(0x10);
|
tft.writecommand(0x10);
|
||||||
|
|||||||
Reference in New Issue
Block a user