156 #include <avr/fuse.h>
170 #if defined( DOXYGEN )
171 const char menu_text0[];
172 const char menu_text1[];
173 const char menu_text2[];
174 const char menu_text3[];
175 const char menu_text4[];
176 const char menu_text5[];
177 const char menu_text6[];
178 const char menu_text7[];
179 const char menu_text8[];
180 const char menu_text9[];
181 const char menu_text10[];
182 const char menu_text11[];
183 const char menu_text12[];
184 const char menu_text13[];
185 const char menu_text14[];
186 const char menu_text15[];
187 const char menu_text16[];
188 const char menu_text17[];
192 const char menu_text0[] PROGMEM =
"CONTIKI";
193 const char menu_text1[] PROGMEM =
"6LOWPAN";
194 const char menu_text2[] PROGMEM =
"PING";
195 const char menu_text3[] PROGMEM =
"PINGING";
196 const char menu_text4[] PROGMEM =
"TEMP";
197 const char menu_text5[] PROGMEM =
"MODE ";
198 const char menu_text6[] PROGMEM =
"DEG F";
199 const char menu_text7[] PROGMEM =
"DEG C";
200 const char menu_text8[] PROGMEM =
"SEND";
201 const char menu_text9[] PROGMEM =
"ONCE";
202 const char menu_text10[] PROGMEM =
"AUTO";
203 const char menu_text11[] PROGMEM =
"DEBUG";
204 const char menu_text12[] PROGMEM =
"DBG ON";
205 const char menu_text13[] PROGMEM =
"DBG OFF";
206 const char menu_text14[] PROGMEM =
"SENT";
207 const char menu_text15[] PROGMEM =
"SENDING";
208 const char menu_text16[] PROGMEM =
"SLEEP";
209 const char menu_text17[] PROGMEM =
"DOZE";
222 {menu_text0, 0, 2, 0, 0, 0, 0 },
223 {menu_text1, 0, 2, 0, 0, 0, 0 },
225 {menu_text3, 2, 2, 2, 2, 0, 0 },
226 {menu_text4, 0, 5, 2, 11, 0, 0 },
227 {menu_text5, 4, 6, 8, 8, 0, 0 },
230 {menu_text8, 4, 9, 5, 5, 0, 0 },
233 {menu_text11, 0, 12, 4, 16, 0, 0 },
236 {menu_text14, 9, 14, 14, 14, 0, 0 },
237 {menu_text15, 10, 15, 15, 15, 0, 0 },
245 key_state_t button=KEY_STATE_NO_KEY;
248 uint8_t timeout_count;
262 uint8_t *src = (uint8_t*)&menu_items[ndx];
263 uint8_t *dest = (uint8_t*)&menu;
266 *dest++ = pgm_read_byte(src+i);
271 char top_menu_text[20];
282 if(menu.
text == menu_text0){
286 else if(menu.
text == menu_text1){
291 if (top_menu_text[0]) {
309 if(menu.
text == menu_text12){
313 if(menu.
text == menu_text10){
317 if(menu.
text == menu_text2){
374 if((PING_ATTEMPTS == count) && !timeout_flag){
379 else if(timeout_flag){
380 timeout_flag =
false;
383 if(PING_ATTEMPTS == timeout_count){