finalbeta2

This commit is contained in:
richonguzman 2023-03-01 15:00:25 -03:00
parent 1e2d8410d7
commit 83898af7af
1 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ void APRS_IS_connect(){
} }
} }
String GetTime() { String getDateTime() {
struct tm timeinfo; struct tm timeinfo;
String currentTime, year, month, day, hour, minute, seconds; String currentTime, year, month, day, hour, minute, seconds;
if(!getLocalTime(&timeinfo)){ if(!getLocalTime(&timeinfo)){
@ -72,7 +72,7 @@ void setup() {
setup_wifi(); setup_wifi();
btStop(); btStop();
configTime(gmtOffset_sec, daylightOffset_sec, ntpServer); configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
GetTime(); getDateTime();
Serial.println("Starting Weather Report APRS\n"); Serial.println("Starting Weather Report APRS\n");
} }
@ -126,7 +126,7 @@ void loop() {
espClient.write(ackMessage.c_str()); espClient.write(ackMessage.c_str());
delay(500); delay(500);
} }
currentDate = GetTime(); currentDate = getDateTime();
answerMessage = "WRCLP>APLG01,TCPIP*,qAC,CHILE::" + questioner + ":" + "hola, " + questioner + " " + currentDate + "\n"; answerMessage = "WRCLP>APLG01,TCPIP*,qAC,CHILE::" + questioner + ":" + "hola, " + questioner + " " + currentDate + "\n";
Serial.print("-------> " + answerMessage); Serial.print("-------> " + answerMessage);
espClient.write(answerMessage.c_str()); espClient.write(answerMessage.c_str());