Basic MAC data interface for LoRa transceiver
Dependents: LoRaBaseStation LoRaTerminal
Diff: AlohaTransceiver.cpp
- Revision:
- 10:065a4b58c6ff
- Parent:
- 9:3074f6e08d8e
- Child:
- 11:3e1ff29da71a
--- a/AlohaTransceiver.cpp Wed Jul 27 03:20:55 2016 +0000 +++ b/AlohaTransceiver.cpp Wed Jul 27 03:42:12 2016 +0000 @@ -131,7 +131,7 @@ void AlohaTransceiver::enable() { // entering passive receiver mode - Radio.Rx( RX_TIMEOUT_VALUE ); + Radio.Rx( 0 ); } void AlohaTransceiver::poll() @@ -149,31 +149,31 @@ AlohaTypeCallbackTable[frame.getType()](&frame); } - Radio.Rx( RX_TIMEOUT_VALUE ); + Radio.Rx( 0 ); State = LOWPOWER; break; } case TX: { - Radio.Rx( RX_TIMEOUT_VALUE ); + Radio.Rx( 0 ); State = LOWPOWER; break; } case RX_TIMEOUT: { - Radio.Rx( RX_TIMEOUT_VALUE ); + Radio.Rx( 0 ); State = LOWPOWER; break; } case RX_ERROR: { - Radio.Rx( RX_TIMEOUT_VALUE ); + Radio.Rx( 0 ); State = LOWPOWER; break; } case TX_TIMEOUT: { - Radio.Rx( RX_TIMEOUT_VALUE ); + Radio.Rx( 0 ); State = LOWPOWER; break; } @@ -191,9 +191,8 @@ void AlohaTransceiver::send(uint8_t *buffer, int length) { - Radio.Rx( 0 ); Radio.Send(buffer, length); - //Radio.Rx( RX_TIMEOUT_VALUE ); + State = LOWPOWER; } void AlohaTransceiver::registerType(AlohaFrame::AlohaType_t type, aloha_callback_func f)