Devel-menu egg

This commit is contained in:
Stefan `Sec` Zehl 2011-08-05 01:58:12 +02:00
parent b48bb42f36
commit 4836f5b8f5
3 changed files with 15 additions and 4 deletions

View File

@ -30,6 +30,7 @@ void main_default(void) {
break;
case BTN_RIGHT:
GLOBAL(develmode)=1;
applyConfig();
break;
case BTN_DOWN:
usbMSCInit();

View File

@ -19,3 +19,9 @@ void execute_menu(void){
lcdRefresh();
};
//# MENU |devel
void execute_devel(void){
while(getInput()!=BTN_NONE);
executeSelect("INT");
lcdRefresh();
};

View File

@ -1,6 +1,7 @@
#include <sysinit.h>
#include "basic/basic.h"
#include "basic/config.h"
#include "lcd/print.h"
@ -11,7 +12,7 @@ uint8_t menuflags=0;
void handleMenu(const struct MENU *the_menu) {
uint8_t back = 0;
int8_t menuselection = 0;
uint8_t numentries = 0;
uint8_t numentries;
uint8_t visible_lines = 0;
uint8_t current_offset = 0;
@ -21,6 +22,9 @@ void handleMenu(const struct MENU *the_menu) {
for (numentries = 0; the_menu->entries[numentries].text != NULL ; numentries++);
if(the_menu->entries[numentries-1].text[0]=='|' && !GLOBAL(develmode))
numentries--;
visible_lines = lcdGetVisibleLines()-1; // subtract title line
if(menuflags&MENU_BIG)
@ -81,8 +85,8 @@ void handleMenu(const struct MENU *the_menu) {
break;
case BTN_ENTER:
lcdClear();
lcdPrintln("Called...");
lcdRefresh();
// lcdPrintln("Called...");
// lcdRefresh();
getInputWaitRelease();
if (the_menu->entries[menuselection].callback!=NULL)
the_menu->entries[menuselection].callback();
@ -91,7 +95,7 @@ void handleMenu(const struct MENU *the_menu) {
if (menuflags&MENU_JUSTONCE)
return;
getInputWait();
// getInputWait();
break;
case BTN_NONE: /* timeout */