- STATE_OFF = 0, // timer off, radio off
- STATE_SLEEP = 1, // timer on, radio off
- STATE_LISTEN = 2, // timer on/off, radio on
- STATE_SEND = 3, // timer on/off, radio on
-
- STATE_OFF_TO_LISTEN = 10,
- STATE_SLEEP_TO_LISTEN = 11,
- STATE_SLEEP_TO_SEND = 12,
- STATE_SLEEP_TO_OFF = 13,
- STATE_LISTEN_TO_SLEEP_1 = 14, // we go back to listen if a message arrives in this state
- STATE_LISTEN_TO_SLEEP_2 = 15,
- STATE_LISTEN_TO_OFF = 16,
- STATE_SEND_DONE = 17,
+ OFF = 0,
+ OFF_SUBSTOP = 1, // must have consecutive indices
+ OFF_SUBSTOP_DONE = 2, // must have consecutive indices
+ OFF_STOP_END = 3, // must have consecutive indices
+ OFF_START_END = 4,
+
+ LISTEN_SUBSTART = 5, // must have consecutive indices
+ LISTEN_SUBSTART_DONE = 6, // must have consecutive indices
+ LISTEN_TIMER = 7, // must have consecutive indices
+ LISTEN = 8, // must have consecutive indices
+
+ SLEEP_SUBSTOP = 9, // must have consecutive indices
+ SLEEP_SUBSTOP_DONE = 10, // must have consecutive indices
+ SLEEP_TIMER = 11, // must have consecutive indices
+ SLEEP = 12, // must have consecutive indices
+
+ SEND_SUBSTART = 13, // must have consecutive indices
+ SEND_SUBSTART_DONE = 14, // must have consecutive indices
+ SEND_TIMER = 15, // must have consecutive indices
+ SEND_SUBSEND= 16,
+ SEND_SUBSEND_DONE = 17,
+ SEND_SUBSEND_DONE_LAST = 18,
+ SEND_DONE = 19,