Skip to content

Commit acdf522

Browse files
committed
Issue #1005 - Fixed FSK_BANDWIDTH and FSK_AFC_BANDWIDTH to use single sided bandwidth values for all radios in ping-pong and rx-sensi examples
1 parent d2b4a42 commit acdf522

File tree

6 files changed

+12
-120
lines changed

6 files changed

+12
-120
lines changed

src/apps/ping-pong/NucleoL073/main.c

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
#if defined( USE_MODEM_LORA )
7777

78-
#define LORA_BANDWIDTH 2 // [0: 125 kHz,
78+
#define LORA_BANDWIDTH 0 // [0: 125 kHz,
7979
// 1: 250 kHz,
8080
// 2: 500 kHz,
8181
// 3: Reserved]
@@ -85,34 +85,16 @@
8585
// 3: 4/7,
8686
// 4: 4/8]
8787
#define LORA_PREAMBLE_LENGTH 8 // Same for Tx and Rx
88-
#define LORA_SYMBOL_TIMEOUT 0 // Symbols
88+
#define LORA_SYMBOL_TIMEOUT 5 // Symbols
8989
#define LORA_FIX_LENGTH_PAYLOAD_ON false
9090
#define LORA_IQ_INVERSION_ON false
9191

9292
#elif defined( USE_MODEM_FSK )
9393

9494
#define FSK_FDEV 25000 // Hz
9595
#define FSK_DATARATE 50000 // bps
96-
97-
#if defined( SX1272MB2DAS ) || defined( SX1276MB1LAS ) || defined( SX1276MB1MAS )
98-
99-
#define FSK_BANDWIDTH 50000 // Hz >> SSB in sx127x
96+
#define FSK_BANDWIDTH 50000 // Hz
10097
#define FSK_AFC_BANDWIDTH 83333 // Hz
101-
102-
#elif defined( SX1261MBXBAS ) || defined( SX1262MBXCAS ) || defined( SX1262MBXDAS )
103-
104-
#define FSK_BANDWIDTH 100000 // Hz >> DSB in sx126x
105-
#define FSK_AFC_BANDWIDTH 166666 // Hz >> Unused in sx126x
106-
107-
#elif defined( LR1110MB1XXS )
108-
109-
#define FSK_BANDWIDTH 100000 // Hz >> DSB in LR1110
110-
#define FSK_AFC_BANDWIDTH 166666 // Hz >> Unused in LR1110
111-
112-
#else
113-
#error "Please define a mbed shield in the compiler options."
114-
#endif
115-
11698
#define FSK_PREAMBLE_LENGTH 5 // Same for Tx and Rx
11799
#define FSK_FIX_LENGTH_PAYLOAD_ON false
118100

src/apps/ping-pong/NucleoL152/main.c

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
#if defined( USE_MODEM_LORA )
7777

78-
#define LORA_BANDWIDTH 2 // [0: 125 kHz,
78+
#define LORA_BANDWIDTH 0 // [0: 125 kHz,
7979
// 1: 250 kHz,
8080
// 2: 500 kHz,
8181
// 3: Reserved]
@@ -85,34 +85,16 @@
8585
// 3: 4/7,
8686
// 4: 4/8]
8787
#define LORA_PREAMBLE_LENGTH 8 // Same for Tx and Rx
88-
#define LORA_SYMBOL_TIMEOUT 0 // Symbols
88+
#define LORA_SYMBOL_TIMEOUT 5 // Symbols
8989
#define LORA_FIX_LENGTH_PAYLOAD_ON false
9090
#define LORA_IQ_INVERSION_ON false
9191

9292
#elif defined( USE_MODEM_FSK )
9393

9494
#define FSK_FDEV 25000 // Hz
9595
#define FSK_DATARATE 50000 // bps
96-
97-
#if defined( SX1272MB2DAS ) || defined( SX1276MB1LAS ) || defined( SX1276MB1MAS )
98-
99-
#define FSK_BANDWIDTH 50000 // Hz >> SSB in sx127x
96+
#define FSK_BANDWIDTH 50000 // Hz
10097
#define FSK_AFC_BANDWIDTH 83333 // Hz
101-
102-
#elif defined( SX1261MBXBAS ) || defined( SX1262MBXCAS ) || defined( SX1262MBXDAS )
103-
104-
#define FSK_BANDWIDTH 100000 // Hz >> DSB in sx126x
105-
#define FSK_AFC_BANDWIDTH 166666 // Hz >> Unused in sx126x
106-
107-
#elif defined( LR1110MB1XXS )
108-
109-
#define FSK_BANDWIDTH 100000 // Hz >> DSB in LR1110
110-
#define FSK_AFC_BANDWIDTH 166666 // Hz >> Unused in LR1110
111-
112-
#else
113-
#error "Please define a mbed shield in the compiler options."
114-
#endif
115-
11698
#define FSK_PREAMBLE_LENGTH 5 // Same for Tx and Rx
11799
#define FSK_FIX_LENGTH_PAYLOAD_ON false
118100

src/apps/ping-pong/NucleoL476/main.c

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
#if defined( USE_MODEM_LORA )
7777

78-
#define LORA_BANDWIDTH 2 // [0: 125 kHz,
78+
#define LORA_BANDWIDTH 0 // [0: 125 kHz,
7979
// 1: 250 kHz,
8080
// 2: 500 kHz,
8181
// 3: Reserved]
@@ -85,34 +85,16 @@
8585
// 3: 4/7,
8686
// 4: 4/8]
8787
#define LORA_PREAMBLE_LENGTH 8 // Same for Tx and Rx
88-
#define LORA_SYMBOL_TIMEOUT 0 // Symbols
88+
#define LORA_SYMBOL_TIMEOUT 5 // Symbols
8989
#define LORA_FIX_LENGTH_PAYLOAD_ON false
9090
#define LORA_IQ_INVERSION_ON false
9191

9292
#elif defined( USE_MODEM_FSK )
9393

9494
#define FSK_FDEV 25000 // Hz
9595
#define FSK_DATARATE 50000 // bps
96-
97-
#if defined( SX1272MB2DAS ) || defined( SX1276MB1LAS ) || defined( SX1276MB1MAS )
98-
99-
#define FSK_BANDWIDTH 50000 // Hz >> SSB in sx127x
96+
#define FSK_BANDWIDTH 50000 // Hz
10097
#define FSK_AFC_BANDWIDTH 83333 // Hz
101-
102-
#elif defined( SX1261MBXBAS ) || defined( SX1262MBXCAS ) || defined( SX1262MBXDAS )
103-
104-
#define FSK_BANDWIDTH 100000 // Hz >> DSB in sx126x
105-
#define FSK_AFC_BANDWIDTH 166666 // Hz >> Unused in sx126x
106-
107-
#elif defined( LR1110MB1XXS )
108-
109-
#define FSK_BANDWIDTH 100000 // Hz >> DSB in LR1110
110-
#define FSK_AFC_BANDWIDTH 166666 // Hz >> Unused in LR1110
111-
112-
#else
113-
#error "Please define a mbed shield in the compiler options."
114-
#endif
115-
11698
#define FSK_PREAMBLE_LENGTH 5 // Same for Tx and Rx
11799
#define FSK_FIX_LENGTH_PAYLOAD_ON false
118100

src/apps/rx-sensi/NucleoL073/main.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -93,26 +93,8 @@
9393
#elif defined( USE_MODEM_FSK )
9494

9595
#define FSK_DATARATE 50000 // bps
96-
97-
#if defined( SX1272MB2DAS ) || defined( SX1276MB1LAS ) || defined( SX1276MB1MAS )
98-
99-
#define FSK_BANDWIDTH 50000 // Hz >> SSB in sx127x
96+
#define FSK_BANDWIDTH 50000 // Hz
10097
#define FSK_AFC_BANDWIDTH 83333 // Hz
101-
102-
#elif defined( SX1261MBXBAS ) || defined( SX1262MBXCAS ) || defined( SX1262MBXDAS )
103-
104-
#define FSK_BANDWIDTH 100000 // Hz >> DSB in sx126x
105-
#define FSK_AFC_BANDWIDTH 166666 // Hz >> Unused in sx126x
106-
107-
#elif defined( LR1110MB1XXS )
108-
109-
#define FSK_BANDWIDTH 100000 // Hz >> DSB in LR1110
110-
#define FSK_AFC_BANDWIDTH 166666 // Hz >> Unused in LR1110
111-
112-
#else
113-
#error "Please define a mbed shield in the compiler options."
114-
#endif
115-
11698
#define FSK_PREAMBLE_LENGTH 5 // Same for Tx and Rx
11799
#define FSK_FIX_LENGTH_PAYLOAD_ON false
118100

src/apps/rx-sensi/NucleoL152/main.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -93,26 +93,8 @@
9393
#elif defined( USE_MODEM_FSK )
9494

9595
#define FSK_DATARATE 50000 // bps
96-
97-
#if defined( SX1272MB2DAS ) || defined( SX1276MB1LAS ) || defined( SX1276MB1MAS )
98-
99-
#define FSK_BANDWIDTH 50000 // Hz >> SSB in sx127x
96+
#define FSK_BANDWIDTH 50000 // Hz
10097
#define FSK_AFC_BANDWIDTH 83333 // Hz
101-
102-
#elif defined( SX1261MBXBAS ) || defined( SX1262MBXCAS ) || defined( SX1262MBXDAS )
103-
104-
#define FSK_BANDWIDTH 100000 // Hz >> DSB in sx126x
105-
#define FSK_AFC_BANDWIDTH 166666 // Hz >> Unused in sx126x
106-
107-
#elif defined( LR1110MB1XXS )
108-
109-
#define FSK_BANDWIDTH 100000 // Hz >> DSB in LR1110
110-
#define FSK_AFC_BANDWIDTH 166666 // Hz >> Unused in LR1110
111-
112-
#else
113-
#error "Please define a mbed shield in the compiler options."
114-
#endif
115-
11698
#define FSK_PREAMBLE_LENGTH 5 // Same for Tx and Rx
11799
#define FSK_FIX_LENGTH_PAYLOAD_ON false
118100

src/apps/rx-sensi/NucleoL476/main.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -93,26 +93,8 @@
9393
#elif defined( USE_MODEM_FSK )
9494

9595
#define FSK_DATARATE 50000 // bps
96-
97-
#if defined( SX1272MB2DAS ) || defined( SX1276MB1LAS ) || defined( SX1276MB1MAS )
98-
99-
#define FSK_BANDWIDTH 50000 // Hz >> SSB in sx127x
96+
#define FSK_BANDWIDTH 50000 // Hz
10097
#define FSK_AFC_BANDWIDTH 83333 // Hz
101-
102-
#elif defined( SX1261MBXBAS ) || defined( SX1262MBXCAS ) || defined( SX1262MBXDAS )
103-
104-
#define FSK_BANDWIDTH 100000 // Hz >> DSB in sx126x
105-
#define FSK_AFC_BANDWIDTH 166666 // Hz >> Unused in sx126x
106-
107-
#elif defined( LR1110MB1XXS )
108-
109-
#define FSK_BANDWIDTH 100000 // Hz >> DSB in LR1110
110-
#define FSK_AFC_BANDWIDTH 166666 // Hz >> Unused in LR1110
111-
112-
#else
113-
#error "Please define a mbed shield in the compiler options."
114-
#endif
115-
11698
#define FSK_PREAMBLE_LENGTH 5 // Same for Tx and Rx
11799
#define FSK_FIX_LENGTH_PAYLOAD_ON false
118100

0 commit comments

Comments
 (0)