no more cleanTFT needed

This commit is contained in:
richonguzman 2024-11-16 14:05:47 -03:00
parent 1aaa11df0a
commit b82909c3c6
6 changed files with 11 additions and 26 deletions

View File

@ -177,12 +177,6 @@ void draw_T_DECK_Body(const String& line1, const String& line2, const String& li
sprite.drawString("REC:",190,208);
sprite.drawString(String(recN), 215, 208);*/
void cleanTFT() {
/*#ifdef HAS_TFT
tft.fillScreen(TFT_BLACK);
#endif*/
}
String fillStringLength(const String& line, uint8_t length) {
String outputLine = line;
for (int a = line.length(); a < length; a++) {
@ -297,7 +291,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
sprite.setTextSize(smallSizeFont);
sprite.setTextColor(TFT_WHITE, TFT_BLACK);
for (int i = 0; i < 5; i++) {
for (int i = 0; i < 2; i++) {
sprite.drawString(*lines[i], 3,(lineSpacing * (2 + i)) - 2);
}
#endif
@ -453,9 +447,6 @@ void startupScreen(uint8_t index, const String& version) {
case 2: workingFreq += "UK]"; break;
}
displayShow(" LoRa APRS", " (TRACKER)", workingFreq, "", "", " CA2RXU " + version, 4000);
#ifdef HAS_TFT
cleanTFT();
#endif
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Main", "RichonGuzman (CA2RXU) --> LoRa APRS Tracker/Station");
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Main", "Version: %s", version);
}

View File

@ -3,7 +3,6 @@
void displaySetup();
void displayToggle(bool toggle);
void cleanTFT();
void displayShow(const String& header, const String& line1, const String& line2, int wait = 0);
void displayShow(const String& header, const String& line1, const String& line2, const String& line3, const String& line4, const String& line5, int wait = 0);

View File

@ -179,9 +179,9 @@ namespace LoRa_Utils {
delay(Config.ptt.postDelay);
digitalWrite(Config.ptt.io_pin, Config.ptt.reverse ? HIGH : LOW);
}
#ifdef HAS_TFT
/*#ifdef HAS_TFT
cleanTFT();
#endif
#endif*/
}
void wakeRadio() {

View File

@ -240,9 +240,9 @@ namespace MSG_Utils {
void sendMessage(const String& station, const String& textMessage) {
String newPacket = APRSPacketLib::generateMessagePacket(currentBeacon->callsign, "APLRT1", Config.path, station, textMessage);
#if HAS_TFT
/*#if HAS_TFT
cleanTFT();
#endif
#endif*/
if (textMessage.indexOf("ack") == 0 && station != "WLNK-1") { // don't show Winlink ACK
displayShow("<<ACK Tx>>", "", "", 500);
} else if (station.indexOf("CA2RXU-15") == 0 && textMessage.indexOf("wrl") == 0) {

View File

@ -172,7 +172,7 @@ namespace POWER_Utils {
void batteryManager() {
#ifdef ADC_CTRL
if(batteryMeasurmentTime == 0 || (millis() - batteryMeasurmentTime) > 30 * 1000) obtainBatteryInfo();
if (batteryMeasurmentTime == 0 || (millis() - batteryMeasurmentTime) > 30 * 1000) obtainBatteryInfo();
#else
obtainBatteryInfo();
#endif

View File

@ -224,9 +224,7 @@ namespace STATION_Utils {
}
} else {
String path = Config.path;
if (gps.speed.kmph() > 200 || gps.altitude.meters() > 9000) { // avoid plane speed and altitude
path = "";
}
if (gps.speed.kmph() > 200 || gps.altitude.meters() > 9000) path = ""; // avoid plane speed and altitude
if (miceActive) {
packet = APRSPacketLib::generateMiceGPSBeacon(currentBeacon->micE, currentBeacon->callsign, currentBeacon->symbol, currentBeacon->overlay, path, gps.location.lat(), gps.location.lng(), gps.course.deg(), gps.speed.knots(), gps.altitude.meters());
} else {
@ -242,6 +240,7 @@ namespace STATION_Utils {
comment = currentBeacon->comment;
sendCommentAfterXBeacons = Config.sendCommentAfterXBeacons;
}
String batteryVoltage = POWER_Utils::getBatteryInfoVoltage();
bool shouldSleepLowVoltage = false;
#if defined(BATTERY_PIN) || defined(HAS_AXP192) || defined(HAS_AXP2101)
@ -249,6 +248,7 @@ namespace STATION_Utils {
shouldSleepLowVoltage = true;
}
#endif
if (Config.battery.sendVoltage && !Config.battery.voltageAsTelemetry) {
String batteryChargeCurrent = POWER_Utils::getBatteryInfoCurrent();
#if defined(HAS_AXP192)
@ -271,6 +271,7 @@ namespace STATION_Utils {
comment += "%";
#endif
}
if (shouldSleepLowVoltage) {
packet += " **LowVoltagePowerOff**";
} else {
@ -283,10 +284,7 @@ namespace STATION_Utils {
}
}
}
#ifdef HAS_TFT
cleanTFT();
#endif
displayShow("<<< TX >>>", "", packet,100);
displayShow("<<< TX >>>", "", packet, 100);
LoRa_Utils::sendNewPacket(packet);
if (Config.bluetooth.type == 0 || Config.bluetooth.type == 2) { // send Tx packets to Phone too
@ -306,9 +304,6 @@ namespace STATION_Utils {
}
lastTxTime = millis();
sendUpdate = false;
#ifdef HAS_TFT
cleanTFT();
#endif
if (currentBeacon->gpsEcoMode) {
gpsShouldSleep = true;
}