Skip to content

Commit

Permalink
FHSS: Configure in critical state
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarkko Paso committed Oct 15, 2018
1 parent d74d5ff commit e0276f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/Service_Libs/fhss/fhss_ws.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@ int fhss_ws_configuration_set(fhss_structure_t *fhss_structure, const fhss_ws_co
if (channel_count <= 0) {
return -1;
}
platform_enter_critical();
if (fhss_configuration->ws_uc_channel_function == WS_FIXED_CHANNEL || fhss_configuration->fhss_uc_dwell_interval == 0) {
fhss_stop_timer(fhss_structure, fhss_unicast_handler);
fhss_structure->ws->unicast_timer_running = false;
Expand All @@ -739,6 +740,7 @@ int fhss_ws_configuration_set(fhss_structure_t *fhss_structure, const fhss_ws_co
if (fhss_configuration->ws_uc_channel_function == WS_FIXED_CHANNEL) {
fhss_structure->rx_channel = fhss_configuration->unicast_fixed_channel;
}
platform_exit_critical();
tr_info("fhss Configuration set, UC channel: %d, BC channel: %d, UC CF: %d, BC CF: %d, channels: %d, uc dwell: %d, bc dwell: %d, bc interval: %d, bsi:%d",
fhss_structure->ws->fhss_configuration.unicast_fixed_channel,
fhss_structure->ws->fhss_configuration.broadcast_fixed_channel,
Expand Down

0 comments on commit e0276f6

Please sign in to comment.