Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Heltec-Aaron-Lee committed Apr 11, 2023
2 parents 44aacee + 64bcf01 commit 595f02b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void VextOFF(void) //Vext default OFF
pinMode(Vext,OUTPUT);
digitalWrite(Vext, HIGH);
}
void displayGPSInof()
void displayGPSInfo()
{
char str[30];
display.clear();
Expand Down Expand Up @@ -143,7 +143,7 @@ void displayGPSInof()
display.display();
}

void printGPSInof()
void printGPSInfo()
{
Serial.print("Date/Time: ");
if (GPS.date.isValid())
Expand Down Expand Up @@ -243,8 +243,8 @@ static void prepareTxFrame( uint8_t port )
if( (millis()-start) > printinfo )
{
printinfo += 1000;
printGPSInof();
displayGPSInof();
printGPSInfo();
displayGPSInfo();
}
}
}
Expand Down
28 changes: 15 additions & 13 deletions libraries/LoraWan102/src/radio/radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,22 +1158,24 @@ void RadioIrqProcess( void )

if( ( irqRegs & IRQ_RX_DONE ) == IRQ_RX_DONE )
{
//printf("rx done\r\n");
uint8_t size;
TimerStop( &RxTimeoutTimer );
SX126xGetPayload( RadioRxPayload, &size , 255 );
SX126xGetPacketStatus( &RadioPktStatus );
if( ( RadioEvents != NULL ) && ( RadioEvents->RxDone != NULL ) && ( irqRegs & IRQ_CRC_ERROR ) != IRQ_CRC_ERROR)
if( ( irqRegs & IRQ_CRC_ERROR ) == IRQ_CRC_ERROR )
{
RadioEvents->RxDone( RadioRxPayload, size, RadioPktStatus.Params.LoRa.RssiPkt, RadioPktStatus.Params.LoRa.SnrPkt );
if( ( RadioEvents != NULL ) && ( RadioEvents->RxError ) )
{
RadioEvents->RxError( );
}
}
}

if( ( irqRegs & IRQ_CRC_ERROR ) == IRQ_CRC_ERROR )
{
if( ( RadioEvents != NULL ) && ( RadioEvents->RxError ) )
else
{
RadioEvents->RxError( );
//printf("rx done\r\n");
uint8_t size;
TimerStop( &RxTimeoutTimer );
SX126xGetPayload( RadioRxPayload, &size , 255 );
SX126xGetPacketStatus( &RadioPktStatus );
if( ( RadioEvents != NULL ) && ( RadioEvents->RxDone != NULL ) && ( irqRegs & IRQ_CRC_ERROR ) != IRQ_CRC_ERROR)
{
RadioEvents->RxDone( RadioRxPayload, size, RadioPktStatus.Params.LoRa.RssiPkt, RadioPktStatus.Params.LoRa.SnrPkt );
}
}
}

Expand Down

0 comments on commit 595f02b

Please sign in to comment.