kopia lustrzana https://github.com/dl9rdz/rdz_ttgo_sonde
sync sh import / sh telemetry
rodzic
f5281e523c
commit
86566c0427
|
@ -3358,12 +3358,6 @@ void loop() {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if FEATURE_SONDEHUB
|
|
||||||
if (sonde.config.sondehub.active) {
|
|
||||||
// interval check moved to sondehub_station_update to avoid having to calculate distance in auto mode twice
|
|
||||||
sondehub_station_update(&shclient, &sonde.config.sondehub);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FEATURE_SONDEHUB
|
#if FEATURE_SONDEHUB
|
||||||
|
@ -3472,6 +3466,7 @@ void sondehub_station_update(WiFiClient *client, struct st_sondehub *conf) {
|
||||||
Serial.println(strlen(data));
|
Serial.println(strlen(data));
|
||||||
Serial.println(data);
|
Serial.println(data);
|
||||||
Serial.println("Waiting for response");
|
Serial.println("Waiting for response");
|
||||||
|
// TODO: better do this asyncrhonously
|
||||||
String response = client->readString();
|
String response = client->readString();
|
||||||
Serial.println(response);
|
Serial.println(response);
|
||||||
Serial.println("Response done...");
|
Serial.println("Response done...");
|
||||||
|
@ -3530,7 +3525,6 @@ void sondehub_reply_handler(WiFiClient *client) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// send import requests if needed
|
// send import requests if needed
|
||||||
if (sonde.config.sondehub.fiactive) {
|
if (sonde.config.sondehub.fiactive) {
|
||||||
if (shImport == 2) {
|
if (shImport == 2) {
|
||||||
|
@ -3547,6 +3541,13 @@ void sondehub_reply_handler(WiFiClient *client) {
|
||||||
sondehub_send_fimport(&shclient);
|
sondehub_send_fimport(&shclient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// also handle periodic station updates here...
|
||||||
|
// interval check moved to sondehub_station_update to avoid having to calculate distance in auto mode twice
|
||||||
|
if(shState == SH_CONN_IDLE) {
|
||||||
|
// (do not set station update while a telemetry report is being sent
|
||||||
|
sondehub_station_update(&shclient, &sonde.config.sondehub);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sondehub_send_fimport(WiFiClient * client) {
|
void sondehub_send_fimport(WiFiClient * client) {
|
||||||
|
|
Ładowanie…
Reference in New Issue