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);
|
||||
#endif
|
||||
|
||||
bool batterydetect;
|
||||
bool batterydetect = true;
|
||||
bool BWreset;
|
||||
bool change2;
|
||||
bool cleanup;
|
||||
@@ -355,6 +355,9 @@ void setup() {
|
||||
attachInterrupt(digitalPinToInterrupt(ROTARY_PIN_A), 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 (rotarymode == 0) rotarymode = 1; else rotarymode = 0;
|
||||
EEPROM.writeByte(39, rotarymode);
|
||||
@@ -424,9 +427,6 @@ void setup() {
|
||||
ESP.restart();
|
||||
}
|
||||
|
||||
analogWrite(CONTRASTPIN, ContrastSet * 2 + 27);
|
||||
analogWrite(SMETERPIN, 0);
|
||||
|
||||
tft.setSwapBytes(true);
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
tft.setTextColor(TFT_SKYBLUE);
|
||||
@@ -521,7 +521,7 @@ void setup() {
|
||||
Wire.endTransmission();
|
||||
}
|
||||
|
||||
if (analogRead(BATTERY_PIN) < 200) batterydetect = false;
|
||||
if (analogRead(BATTERY_PIN) < 200) batterydetect = false;
|
||||
SelectBand();
|
||||
ShowSignalLevel();
|
||||
ShowBW();
|
||||
|
||||
Reference in New Issue
Block a user