Update main.cpp

This commit is contained in:
tuxphone 2020-09-19 15:06:50 +02:00 committed by GitHub
parent 97f78c0d14
commit d82d0f7e46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ void OnTxTimeout( void )
void OnRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ) void OnRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr )
{ {
( size > BUFFER_SIZE ) ? rxSize = BUFFER_SIZE : rxSize = size; ( size > BUFFER_SIZE ) ? rxSize = BUFFER_SIZE : rxSize = size;
memcpy( mPacket, payload, size ); memcpy( mPacket, payload, rxSize );
Radio.Sleep(); Radio.Sleep();
uint32_t packetID = (uint32_t)mPacket[11]<<24 | (uint32_t)mPacket[10]<<16 | (uint32_t)mPacket[9]<<8 | (uint32_t)mPacket[8]; uint32_t packetID = (uint32_t)mPacket[11]<<24 | (uint32_t)mPacket[10]<<16 | (uint32_t)mPacket[9]<<8 | (uint32_t)mPacket[8];