Skip to content

Commit e5637fd

Browse files
author
Jarkko Paso
committed
FHSS: Initialize next_channel in broadcast channel calculation
1 parent cab9849 commit e5637fd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

source/Service_Libs/fhss/fhss_ws.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,9 @@ fhss_structure_t *fhss_ws_enable(fhss_api_t *fhss_api, const fhss_ws_configurati
7777

7878
static int32_t fhss_ws_calc_bc_channel(fhss_structure_t *fhss_structure)
7979
{
80-
int32_t next_channel;
81-
82-
if (fhss_structure->ws->fhss_configuration.ws_channel_function == WS_FIXED_CHANNEL) {
80+
int32_t next_channel = fhss_structure->rx_channel;
8381

84-
} else if (fhss_structure->ws->fhss_configuration.ws_channel_function == WS_TR51CF) {
82+
if (fhss_structure->ws->fhss_configuration.ws_channel_function == WS_TR51CF) {
8583
next_channel = tr51_get_bc_channel_index(fhss_structure->ws->bc_slot, fhss_structure->ws->fhss_configuration.bsi, fhss_structure->number_of_channels, NULL, 0);
8684
if (++fhss_structure->ws->bc_slot == fhss_structure->number_of_channels) {
8785
fhss_structure->ws->bc_slot = 0;

0 commit comments

Comments
 (0)