Avoid sending packets while Tx is busy

pull/2/head
Max-Plastix 2021-12-05 18:37:46 -08:00
rodzic 5f11e5ccaa
commit 012cd0b524
2 zmienionych plików z 3 dodań i 5 usunięć

Wyświetl plik

@ -33,7 +33,7 @@ void ttn_register(void (*callback)(uint8_t message));
// -----------------------------------------------------------------------------
#define APP_NAME "Helium TTGO"
#define APP_VERSION "1.31 MaxP"
#define APP_VERSION "1.32 MaxP"
// -----------------------------------------------------------------------------
// Configuration

Wyświetl plik

@ -145,7 +145,7 @@ bool trySend()
send_now = false;
}
if (send_now)
if (send_now && LMIC_queryTxReady())
{
//snprintf(buffer, sizeof(buffer), "Moved %4.1fm\n", dist_moved);
// The first distance is crazy.. don't put it on screen.
@ -169,9 +169,7 @@ bool trySend()
last_send_lat = gps_latitude();
last_send_lon = gps_longitude();
return true;
}
else
{
} else {
// snprintf(buffer, sizeof(buffer), "Still: %4.1fm\n", dist_moved);
// screen_print(buffer);
return false;