move is_sending
This commit is contained in:
parent
6a41232a54
commit
39223c0f48
|
@ -174,7 +174,6 @@ uint8_t buffer[] = {
|
|||
|
||||
void do_send(osjob_t* j){
|
||||
// Check if there is not a current TX/RX job running
|
||||
is_sending = 1;
|
||||
if (LMIC.opmode & OP_TXRXPEND) {
|
||||
Serial.println(F("OP_TXRXPEND, not sending"));
|
||||
} else {
|
||||
|
@ -199,6 +198,7 @@ void do_gps(osjob_t* j){
|
|||
gps.encode(softserial_read());
|
||||
}
|
||||
if(!is_sending && gps.location.isValid()) {
|
||||
is_sending = 1;
|
||||
do_send(&sendjob);
|
||||
}
|
||||
os_setTimedCallback(&gpsjob, os_getTime()+sec2osticks(GPS_INTERVAL), do_gps);
|
||||
|
|
Loading…
Reference in New Issue
Block a user