Rev 2050 | Rev 2327 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2050 | Rev 2182 | ||
---|---|---|---|
Line 217... | Line 217... | ||
217 | // ----------------------------------------------------------- |
217 | // ----------------------------------------------------------- |
218 | unsigned char JetiBox_Update(unsigned char key) |
218 | unsigned char JetiBox_Update(unsigned char key) |
219 | { |
219 | { |
220 | #if !defined (RECEIVER_SPEKTRUM_DX7EXP) && !defined (RECEIVER_SPEKTRUM_DX8EXP) |
220 | #if !defined (RECEIVER_SPEKTRUM_DX7EXP) && !defined (RECEIVER_SPEKTRUM_DX8EXP) |
221 | static uint8_t item = 0, last_item = 0; // the menu item |
221 | static uint8_t item = 0, last_item = 0; // the menu item |
- | 222 | static uint8_t updateDelay = 1; |
|
Line 222... | Line 223... | ||
222 | 223 | ||
223 | // navigate within the menu by key action |
224 | // navigate within the menu by key action |
224 | last_item = item; |
225 | last_item = item; |
225 | switch(key) |
226 | switch(key) |
Line 243... | Line 244... | ||
243 | } |
244 | } |
244 | // if the menu item has been changed, do not pass the key to the item handler |
245 | // if the menu item has been changed, do not pass the key to the item handler |
245 | // to avoid jumping over to items |
246 | // to avoid jumping over to items |
246 | if(item != last_item) key = JETIBOX_KEY_UNDEF; |
247 | if(item != last_item) key = JETIBOX_KEY_UNDEF; |
Line -... | Line 248... | ||
- | 248 | ||
- | 249 | if (updateDelay++ & 0x01) |
|
- | 250 | { |
|
247 | 251 | ||
248 | LIBFC_JetiBox_Clear(); |
252 | LIBFC_JetiBox_Clear(); |
249 | //execute menu item handler |
253 | //execute menu item handler |
- | 254 | ((pFctMenu)(pgm_read_word(&(JetiBox_Menu[item].pHandler))))(key); |
|
250 | ((pFctMenu)(pgm_read_word(&(JetiBox_Menu[item].pHandler))))(key); |
255 | } |
251 | #endif |
256 | #endif |
252 | return (0); |
257 | return (0); |