lora_param

This commit is contained in:
2025-03-19 15:36:30 +08:00
parent 49f5db3a10
commit 43a3ef8766
21 changed files with 4195 additions and 4404 deletions

View File

@ -941,7 +941,7 @@ static void RadioSetRxConfig( RadioModems_t modem, uint32_t bandwidth,
SubgRf.ModulationParams.Params.LoRa.SpreadingFactor = ( RadioLoRaSpreadingFactors_t )datarate;
SubgRf.ModulationParams.Params.LoRa.Bandwidth = Bandwidths[bandwidth];
SubgRf.ModulationParams.Params.LoRa.CodingRate = ( RadioLoRaCodingRates_t )coderate;
// SubgRf.PacketParams.Params.Gfsk.SyncWordLength = 1 << 3 ; // convert byte into bit
if( ( ( bandwidth == 0 ) && ( ( datarate == 11 ) || ( datarate == 12 ) ) ) ||
( ( bandwidth == 1 ) && ( datarate == 12 ) ) )
{
@ -981,6 +981,7 @@ static void RadioSetRxConfig( RadioModems_t modem, uint32_t bandwidth,
RadioSetModem( MODEM_LORA );
SUBGRF_SetModulationParams( &SubgRf.ModulationParams );
SUBGRF_SetPacketParams( &SubgRf.PacketParams );
//SUBGRF_SetSyncWord( ( uint8_t[] ){ 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } );
SUBGRF_SetLoRaSymbNumTimeout( symbTimeout );
// WORKAROUND - Optimizing the Inverted IQ Operation, see STM32WL Erratasheet
@ -1052,7 +1053,7 @@ static void RadioSetTxConfig( RadioModems_t modem, int8_t power, uint32_t fdev,
SubgRf.ModulationParams.Params.LoRa.SpreadingFactor = ( RadioLoRaSpreadingFactors_t ) datarate;
SubgRf.ModulationParams.Params.LoRa.Bandwidth = Bandwidths[bandwidth];
SubgRf.ModulationParams.Params.LoRa.CodingRate= ( RadioLoRaCodingRates_t )coderate;
//SubgRf.PacketParams.Params.Gfsk.SyncWordLength = 1 << 3 ; // convert byte into bit
if( ( ( bandwidth == 0 ) && ( ( datarate == 11 ) || ( datarate == 12 ) ) ) ||
( ( bandwidth == 1 ) && ( datarate == 12 ) ) )
{
@ -1090,6 +1091,7 @@ static void RadioSetTxConfig( RadioModems_t modem, int8_t power, uint32_t fdev,
RadioSetModem( MODEM_LORA );
SUBGRF_SetModulationParams( &SubgRf.ModulationParams );
SUBGRF_SetPacketParams( &SubgRf.PacketParams );
//SUBGRF_SetSyncWord( ( uint8_t[] ){ 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } );
break;
#if (RADIO_SIGFOX_ENABLE == 1)
case MODEM_SIGFOX_TX: