summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--digital/beacon/src/configuration.h1
-rw-r--r--digital/beacon/src/main_avr.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/digital/beacon/src/configuration.h b/digital/beacon/src/configuration.h
index dc7c2eac..c3952758 100644
--- a/digital/beacon/src/configuration.h
+++ b/digital/beacon/src/configuration.h
@@ -342,6 +342,7 @@
typedef enum
{
APP_INITIAL_STATE, // Initial state
+ APP_NETWORK_JOIN_REQUEST,
APP_NETWORK_JOINING_STATE, // Attempting join the network
APP_NETWORK_JOINED_STATE, // Successfully joined
APP_NETWORK_LEAVING_STATE, // Leaving from the network
diff --git a/digital/beacon/src/main_avr.c b/digital/beacon/src/main_avr.c
index 0857819d..15610170 100644
--- a/digital/beacon/src/main_avr.c
+++ b/digital/beacon/src/main_avr.c
@@ -99,10 +99,12 @@ void APL_TaskHandler(void)
default:
break;
}
- appState = APP_NETWORK_JOINING_STATE;
+ appState = APP_NETWORK_JOIN_REQUEST;
break;
+ case APP_NETWORK_JOIN_REQUEST:
+ network_start();
+ appState = APP_NETWORK_JOINING_STATE;
case APP_NETWORK_JOINING_STATE:
- network_start();
break;
case APP_NETWORK_LEAVING_STATE:
break;