Fixed diconnected handling.

This commit is contained in:
Fenoglio 2018-07-08 14:00:29 +02:00
parent 0e83e04035
commit 70e3778db0

View file

@ -172,8 +172,8 @@ void loop(void) {
// read data from TOP_STATION ...
if( radio.available()){
// check if radio data is available - if so read the data
connection_established = millis();
while( radio.available(&pipeNo)){ // Read all available payloads
connection_established = millis();
radio.read( &radio_data, sizeof(radio_data) ); // Read the data the TOPSTATION sent
}
current_time_offset = radio_data.topstationtime - millis(); // the offset between TOP_STATION and BASESTATION