Fixed a bug in battery indicator and splash screen
This commit is contained in:
+5
-5
@@ -39,7 +39,7 @@ TFT_eSPI tft = TFT_eSPI(320, 240);
|
|||||||
TFT_eSPI tft = TFT_eSPI(240, 320);
|
TFT_eSPI tft = TFT_eSPI(240, 320);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool batterydetect;
|
bool batterydetect = true;
|
||||||
bool BWreset;
|
bool BWreset;
|
||||||
bool change2;
|
bool change2;
|
||||||
bool cleanup;
|
bool cleanup;
|
||||||
@@ -355,6 +355,9 @@ void setup() {
|
|||||||
attachInterrupt(digitalPinToInterrupt(ROTARY_PIN_A), read_encoder, CHANGE);
|
attachInterrupt(digitalPinToInterrupt(ROTARY_PIN_A), read_encoder, CHANGE);
|
||||||
attachInterrupt(digitalPinToInterrupt(ROTARY_PIN_B), read_encoder, CHANGE);
|
attachInterrupt(digitalPinToInterrupt(ROTARY_PIN_B), read_encoder, CHANGE);
|
||||||
|
|
||||||
|
analogWrite(CONTRASTPIN, ContrastSet * 2 + 27);
|
||||||
|
analogWrite(SMETERPIN, 0);
|
||||||
|
|
||||||
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == HIGH) {
|
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == HIGH) {
|
||||||
if (rotarymode == 0) rotarymode = 1; else rotarymode = 0;
|
if (rotarymode == 0) rotarymode = 1; else rotarymode = 0;
|
||||||
EEPROM.writeByte(39, rotarymode);
|
EEPROM.writeByte(39, rotarymode);
|
||||||
@@ -424,9 +427,6 @@ void setup() {
|
|||||||
ESP.restart();
|
ESP.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
analogWrite(CONTRASTPIN, ContrastSet * 2 + 27);
|
|
||||||
analogWrite(SMETERPIN, 0);
|
|
||||||
|
|
||||||
tft.setSwapBytes(true);
|
tft.setSwapBytes(true);
|
||||||
tft.fillScreen(TFT_BLACK);
|
tft.fillScreen(TFT_BLACK);
|
||||||
tft.setTextColor(TFT_SKYBLUE);
|
tft.setTextColor(TFT_SKYBLUE);
|
||||||
@@ -521,7 +521,7 @@ void setup() {
|
|||||||
Wire.endTransmission();
|
Wire.endTransmission();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (analogRead(BATTERY_PIN) < 200) batterydetect = false;
|
if (analogRead(BATTERY_PIN) < 200) batterydetect = false;
|
||||||
SelectBand();
|
SelectBand();
|
||||||
ShowSignalLevel();
|
ShowSignalLevel();
|
||||||
ShowBW();
|
ShowBW();
|
||||||
|
|||||||
Reference in New Issue
Block a user