Skip to content

Commit 4b7fd70

Browse files
authored
Merge pull request #10867 from teijokinnunen/lora_phy_freq_print_fix
LoRaPHY: Pass frequency set in rx_config() to caller
2 parents 1eeed8c + feb19eb commit 4b7fd70

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

features/lorawan/lorastack/phy/LoRaPHYAU915.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ bool LoRaPHYAU915::rx_config(rx_config_params_t *params)
355355
// Apply window 1 frequency
356356
frequency = AU915_FIRST_RX1_CHANNEL
357357
+ (params->channel % 8) * AU915_STEPWIDTH_RX1_CHANNEL;
358+
// Caller may print the frequency to log so update it to match actual frequency
359+
params->frequency = frequency;
358360
}
359361

360362
// Read the physical datarate from the datarates table

features/lorawan/lorastack/phy/LoRaPHYCN470.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,8 @@ bool LoRaPHYCN470::rx_config(rx_config_params_t *config)
377377
if (config->rx_slot == RX_SLOT_WIN_1) {
378378
// Apply window 1 frequency
379379
frequency = CN470_FIRST_RX1_CHANNEL + (config->channel % 48) * CN470_STEPWIDTH_RX1_CHANNEL;
380+
// Caller may print the frequency to log so update it to match actual frequency
381+
config->frequency = frequency;
380382
}
381383

382384
// Read the physical datarate from the datarates table

features/lorawan/lorastack/phy/LoRaPHYUS915.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,8 @@ bool LoRaPHYUS915::rx_config(rx_config_params_t *config)
374374
if (config->rx_slot == RX_SLOT_WIN_1) {
375375
// Apply window 1 frequency
376376
frequency = US915_FIRST_RX1_CHANNEL + (config->channel % 8) * US915_STEPWIDTH_RX1_CHANNEL;
377+
// Caller may print the frequency to log so update it to match actual frequency
378+
config->frequency = frequency;
377379
}
378380

379381
// Read the physical datarate from the datarates table

0 commit comments

Comments
 (0)