summaryrefslogtreecommitdiffhomepage
path: root/digital
diff options
context:
space:
mode:
authorFlorent Duchon2012-04-22 22:34:17 +0200
committerFlorent Duchon2012-05-04 00:06:27 +0200
commit5b1422b28f7691ac8f2ff3f8b59479d95741426c (patch)
treea4e0cfcf4a73be54b9c3a7776fb452a9c54ca657 /digital
parentfeaad6be148dd94e6182bef52af8a2b52f0cc18a (diff)
digital/beacon: add APP_NETWORK_JOIN_REQUEST state
Diffstat (limited to 'digital')
-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;