Skip to content

Commit ced2dae

Browse files
committed
Pull-request #901 - Fixed IAR C++ Compiler warning:
Warning[Pa093]: implicit conversion from floating point to integer
1 parent fb5e21a commit ced2dae

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/radio/sx1272/sx1272.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,9 +1619,9 @@ void SX1272OnDio2Irq( void* context )
16191619

16201620
SX1272.Settings.FskPacketHandler.RssiValue = -( SX1272Read( REG_RSSIVALUE ) >> 1 );
16211621

1622-
SX1272.Settings.FskPacketHandler.AfcValue = ( int32_t )( double )( ( ( uint16_t )SX1272Read( REG_AFCMSB ) << 8 ) |
1623-
( uint16_t )SX1272Read( REG_AFCLSB ) ) *
1624-
( double )FREQ_STEP;
1622+
SX1272.Settings.FskPacketHandler.AfcValue = ( int32_t )( ( double )( ( ( uint16_t )SX1272Read( REG_AFCMSB ) << 8 ) |
1623+
( uint16_t )SX1272Read( REG_AFCLSB ) ) *
1624+
( double )FREQ_STEP );
16251625
SX1272.Settings.FskPacketHandler.RxGain = ( SX1272Read( REG_LNA ) >> 5 ) & 0x07;
16261626
}
16271627
break;

src/radio/sx1276/sx1276.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,9 +1777,9 @@ void SX1276OnDio2Irq( void* context )
17771777

17781778
SX1276.Settings.FskPacketHandler.RssiValue = -( SX1276Read( REG_RSSIVALUE ) >> 1 );
17791779

1780-
SX1276.Settings.FskPacketHandler.AfcValue = ( int32_t )( double )( ( ( uint16_t )SX1276Read( REG_AFCMSB ) << 8 ) |
1781-
( uint16_t )SX1276Read( REG_AFCLSB ) ) *
1782-
( double )FREQ_STEP;
1780+
SX1276.Settings.FskPacketHandler.AfcValue = ( int32_t )( ( double )( ( ( uint16_t )SX1276Read( REG_AFCMSB ) << 8 ) |
1781+
( uint16_t )SX1276Read( REG_AFCLSB ) ) *
1782+
( double )FREQ_STEP );
17831783
SX1276.Settings.FskPacketHandler.RxGain = ( SX1276Read( REG_LNA ) >> 5 ) & 0x07;
17841784
}
17851785
break;

0 commit comments

Comments
 (0)