This repository was archived by the owner on May 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 33
33
// Enable this flag to use channel traces
34
34
#define FHSS_CHANNEL_DEBUG
35
35
36
+ static void fhss_ws_update_uc_channel_callback (fhss_structure_t * fhss_structure );
37
+
36
38
fhss_structure_t * fhss_ws_enable (fhss_api_t * fhss_api , const fhss_ws_configuration_t * fhss_configuration , const fhss_timer_t * fhss_timer )
37
39
{
38
40
if (!fhss_api || !fhss_configuration || !fhss_timer ) {
@@ -111,6 +113,14 @@ static int fhss_ws_handle_state_set(fhss_structure_t *fhss_structure, fhss_state
111
113
{
112
114
(void ) pan_id ;
113
115
if (fhss_state == FHSS_SYNCHRONIZED ) {
116
+ uint32_t fhss_broadcast_interval = fhss_structure -> fhss_conf .fhss_ws_configuration .fhss_broadcast_interval ;
117
+ uint8_t fhss_bc_dwell_interval = fhss_structure -> fhss_conf .fhss_ws_configuration .fhss_bc_dwell_interval ;
118
+ // Start broadcast schedule when BC intervals are known
119
+ if (fhss_broadcast_interval && fhss_bc_dwell_interval ) {
120
+ fhss_broadcast_handler (fhss_structure -> fhss_api , 0 );
121
+ }
122
+ // Start unicast schedule
123
+ fhss_ws_update_uc_channel_callback (fhss_structure );
114
124
fhss_start_timer (fhss_structure , fhss_structure -> fhss_conf .fhss_ws_configuration .fhss_uc_dwell_interval * 1000 , fhss_superframe_handler );
115
125
}
116
126
You can’t perform that action at this time.
0 commit comments