This commit is contained in:
Pawel Spychalski (DzikuVx)
2018-05-16 17:06:03 +02:00
parent 1c2bd0055e
commit 35053daa90
4 changed files with 21 additions and 20 deletions

View File

@@ -285,7 +285,18 @@ void loop(void)
uint32_t currentMillis = millis();
#ifdef DEVICE_MODE_TX
#ifdef DEVICE_MODE_RX
/*
* This routine handles resync of TX/RX while hoppping frequencies
*/
radioNode.handleChannelDwell();
/*
* Detect the moment when radio module stopped transmittig and put it
* back in to receive state
*/
radioNode.handleTxDoneState(false);
#else
//Process buttons
button0.loop();
@@ -314,21 +325,10 @@ void loop(void)
txInput.restart();
serialRestartMillis = currentMillis;
}
#endif
/*
* This routine handles resync of TX/RX while hoppping frequencies
*/
#ifdef DEVICE_MODE_RX
radioNode.handleChannelDwell();
radioNode.handleTxDoneState(true);
#endif
/*
* Detect the moment when radio module stopped transmittig and put it
* back in to receive state
*/
radioNode.handleTxDoneState();
radioNode.readAndDecode(
&qsp,
&rxDeviceState,
@@ -356,7 +356,7 @@ void loop(void)
qsp.protocolState == QSP_STATE_IDLE &&
qsp.lastTxSlotTimestamp + TX_TRANSMIT_SLOT_RATE < currentMillis
) {
int8_t frameToSend = getFrameToTransmit(&qsp);
#ifndef FORCE_TX_WITHOUT_INPUT