this is avaiable project
Fork of LoRaMacLib by
Diff: mac/LoRaMac.cpp
- Revision:
- 2:737ad7fbc97e
- Parent:
- 1:0a272b37c6cd
- Child:
- 3:675d14219ad5
--- a/mac/LoRaMac.cpp Thu Aug 20 07:45:28 2015 +0000 +++ b/mac/LoRaMac.cpp Fri Aug 21 09:35:57 2015 +0000 @@ -560,7 +560,7 @@ */ void OnChannelCheckTimerEvent( void ) { - ChannelCheckTimer.detach( ); + ChannelCheckTimer.detach( ); LoRaMacState &= ~MAC_CHANNEL_CHECK; if( LoRaMacSetNextChannel( ) == 0 ) @@ -695,16 +695,8 @@ JoinAcceptDelay1 = JOIN_ACCEPT_DELAY1; JoinAcceptDelay2 = JOIN_ACCEPT_DELAY2; - MacStateCheckTimer.attach_us( &OnMacStateCheckTimerEvent, MAC_STATE_CHECK_TIMEOUT ); +// MacStateCheckTimer.attach_us( &OnMacStateCheckTimerEvent, MAC_STATE_CHECK_TIMEOUT ); - // Initialize Radio driver -/* RadioEvents.TxDone = OnRadioTxDone; - RadioEvents.RxDone = OnRadioRxDone; - RadioEvents.RxError = OnRadioRxError; - RadioEvents.TxTimeout = OnRadioTxTimeout; - RadioEvents.RxTimeout = OnRadioRxTimeout; - Radio.Init( &RadioEvents );*/ - // Random seed initialization srand( RAND_SEED ); @@ -1107,8 +1099,7 @@ void OnTxDelayedTimerEvent( void ) { - TxDelayedTimer.detach( ); - + TxDelayedTimer.detach( ); Radio.Send( LoRaMacBuffer, LoRaMacBufferPktLen ); } @@ -1422,7 +1413,7 @@ OnRxWindow2TimerEvent( ); } } -// RxWindowTimer2.detach( ); // Timer is removed anyway in functions above + RxWindowTimer2.detach( ); // Timer is removed anyway in functions above macHdr.Value = payload[pktHeaderLen++];