Skip to content

Commit

Permalink
FW-876. change the states in main function.
Browse files Browse the repository at this point in the history
  • Loading branch information
changtengfei committed Jun 9, 2020
1 parent 3e80010 commit 6d2c8d3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions projects/common/01bsp_continuously_cal/01bsp_continuously_cal.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ int mote_main(void) {

if (app_vars.txpk_txDone){

if (app_vars.time_in_second == BEACON_PERIOD) {

app_vars.state = S_LISTEN_PROBE;
break;
}

app_vars.txpk_txDone = 0;
// led
leds_error_toggle();
Expand Down Expand Up @@ -165,15 +171,9 @@ int mote_main(void) {
void cb_scTimerCompare(void) {

if (app_vars.state == S_SEND_BEACON) {

if (app_vars.time_in_second == BEACON_PERIOD) {

app_vars.state = S_LISTEN_PROBE;
} else {

app_vars.time_in_second++;
sctimer_setCompare(sctimer_readCounter()+ TICKS_IN_ONE_SECOND);
}
app_vars.time_in_second++;
sctimer_setCompare(sctimer_readCounter()+ TICKS_IN_ONE_SECOND);
} else {
// todo

Expand Down

0 comments on commit 6d2c8d3

Please sign in to comment.