TSCH: automatically leave the network when setting as coordinator/node
This commit is contained in:
parent
9cb34c85c0
commit
d26e5fb489
@ -185,6 +185,9 @@ static void packet_input(void);
|
|||||||
void
|
void
|
||||||
tsch_set_coordinator(int enable)
|
tsch_set_coordinator(int enable)
|
||||||
{
|
{
|
||||||
|
if(tsch_is_coordinator != enable) {
|
||||||
|
tsch_is_associated = 0;
|
||||||
|
}
|
||||||
tsch_is_coordinator = enable;
|
tsch_is_coordinator = enable;
|
||||||
tsch_set_eb_period(TSCH_EB_PERIOD);
|
tsch_set_eb_period(TSCH_EB_PERIOD);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user