const String mod1
This commit is contained in:
parent
c42a094377
commit
3c2e8aed48
|
|
@ -111,7 +111,7 @@ void Configuration::readFile(fs::FS &fs, const char *fileName) {
|
|||
bool Configuration::validateConfigFile(String currentBeaconCallsign) {
|
||||
if (currentBeaconCallsign.indexOf("NOCALL") != -1) {
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, "Config", "Change all your callsigns in 'data/tracker_config.json' and upload it via 'Upload File System image'");
|
||||
show_display("ERROR", "Callsigns = NOCALL!", "---> change it !!!");
|
||||
show_display("ERROR", "Callsigns = NOCALL!", "---> change it !!!", 2000);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ void display_toggle(bool toggle) {
|
|||
}
|
||||
}
|
||||
|
||||
void show_display(String header, String line1, String line2, int wait) {
|
||||
void show_display(const String& header, const String& line1, const String& line2, int wait) {
|
||||
#ifdef HAS_TFT
|
||||
cleanTFT();
|
||||
tft.setTextColor(TFT_WHITE,TFT_BLACK);
|
||||
|
|
@ -181,7 +181,7 @@ void show_display(String header, String line1, String line2, int wait) {
|
|||
delay(wait);
|
||||
}
|
||||
|
||||
void show_display(String header, String line1, String line2, String line3, String line4, String line5, int wait) {
|
||||
void show_display(const String& header, const String& line1, const String& line2, const String& line3, const String& line4, const String& line5, int wait) {
|
||||
#ifdef HAS_TFT
|
||||
if (menuDisplay != lastMenuDisplay) {
|
||||
lastMenuDisplay = menuDisplay;
|
||||
|
|
@ -298,14 +298,12 @@ void show_display(String header, String line1, String line2, String line3, Strin
|
|||
delay(wait);
|
||||
}
|
||||
|
||||
void startupScreen(uint8_t index, String version) {
|
||||
void startupScreen(uint8_t index, const String& version) {
|
||||
String workingFreq = " LoRa Freq [";
|
||||
if (index == 0) {
|
||||
workingFreq += "Eu]";
|
||||
} else if (index == 1) {
|
||||
workingFreq += "PL]";
|
||||
} else if (index == 2) {
|
||||
workingFreq += "UK]";
|
||||
switch (index) {
|
||||
case 0: workingFreq += "Eu]"; break;
|
||||
case 1: workingFreq += "PL]"; break;
|
||||
case 2: workingFreq += "UK]"; break;
|
||||
}
|
||||
show_display(" LoRa APRS", " (TRACKER)", workingFreq, "", "Richonguzman / CA2RXU", " " + version, 4000);
|
||||
#ifdef HAS_TFT
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ void setup_display();
|
|||
void display_toggle(bool toggle);
|
||||
void cleanTFT();
|
||||
|
||||
void show_display(String header, String line1, String line2, int wait = 0);
|
||||
void show_display(String header, String line1, String line2, String line3, String line4, String line5, int wait = 0);
|
||||
void show_display(const String& header, const String& line1, const String& line2, int wait = 0);
|
||||
void show_display(const String& header, const String& line1, const String& line2, const String& line3, const String& line4, const String& line5, int wait = 0);
|
||||
|
||||
void startupScreen(uint8_t index, String version);
|
||||
void startupScreen(uint8_t index, const String& version);
|
||||
|
||||
#endif
|
||||
|
|
@ -50,11 +50,11 @@ namespace GPS_Utils {
|
|||
neo6m_gps.begin(GPS_BAUD, SERIAL_8N1, GPS_TX, GPS_RX);
|
||||
}
|
||||
|
||||
void calculateDistanceCourse(String Callsign, double checkpointLatitude, double checkPointLongitude) {
|
||||
void calculateDistanceCourse(const String& callsign, double checkpointLatitude, double checkPointLongitude) {
|
||||
double distanceKm = TinyGPSPlus::distanceBetween(gps.location.lat(), gps.location.lng(), checkpointLatitude, checkPointLongitude) / 1000.0;
|
||||
double courseTo = TinyGPSPlus::courseTo(gps.location.lat(), gps.location.lng(), checkpointLatitude, checkPointLongitude);
|
||||
STATION_Utils::deleteListenedTrackersbyTime();
|
||||
STATION_Utils::orderListenedTrackersByDistance(Callsign, distanceKm, courseTo);
|
||||
STATION_Utils::orderListenedTrackersByDistance(callsign, distanceKm, courseTo);
|
||||
}
|
||||
|
||||
void getData() {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
namespace GPS_Utils {
|
||||
|
||||
void setup();
|
||||
void calculateDistanceCourse(String Callsign, double checkpointLatitude, double checkPointLongitude);
|
||||
void calculateDistanceCourse(const String& callsign, double checkpointLatitude, double checkPointLongitude);
|
||||
void getData();
|
||||
void setDateFromData();
|
||||
void calculateDistanceTraveled();
|
||||
|
|
|
|||
Loading…
Reference in New Issue