2011-08-02 00:10:15 +00:00
|
|
|
#include <sysinit.h>
|
|
|
|
|
|
|
|
#include "basic/basic.h"
|
|
|
|
|
|
|
|
#include "lcd/print.h"
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
2011-08-03 08:54:22 +00:00
|
|
|
#include "basic/ecc.h"
|
|
|
|
|
2011-08-04 15:20:24 +00:00
|
|
|
#include "basic/config.h"
|
2011-08-04 23:33:48 +00:00
|
|
|
#include "filesystem/execute.h"
|
2011-08-04 15:20:24 +00:00
|
|
|
|
2011-08-02 00:10:15 +00:00
|
|
|
/**************************************************************************/
|
|
|
|
|
|
|
|
#include "final.gen"
|
|
|
|
|
2011-08-02 11:31:57 +00:00
|
|
|
void init_nick();
|
2011-08-02 00:10:15 +00:00
|
|
|
void fancyNickname();
|
|
|
|
|
|
|
|
void main_final(void) {
|
2011-08-04 22:49:00 +00:00
|
|
|
init_nick();
|
|
|
|
if(GLOBAL(privacy)>2){ //firstboot
|
2011-08-05 15:39:00 +00:00
|
|
|
if(execute_file("1boot.int")){
|
2011-08-04 15:20:24 +00:00
|
|
|
lcdPrintln("Badge SETUP");
|
|
|
|
lcdPrintln("error.");
|
|
|
|
lcdPrintln("Features may");
|
|
|
|
lcdPrintln("be broken.");
|
|
|
|
lcdRefresh();
|
|
|
|
getInputWait();
|
|
|
|
getInputWaitRelease();
|
|
|
|
GLOBAL(privacy)=0;
|
|
|
|
}else{
|
|
|
|
saveConfig();
|
|
|
|
};
|
|
|
|
};
|
2011-08-02 00:10:15 +00:00
|
|
|
//checkFirstBoot();
|
2011-08-02 11:31:57 +00:00
|
|
|
init_final();
|
2011-08-02 18:49:55 +00:00
|
|
|
menuflags|=MENU_TIMEOUT;
|
2011-08-02 00:10:15 +00:00
|
|
|
|
|
|
|
while(1){
|
2011-08-05 13:00:00 +00:00
|
|
|
if(GLOBAL(develmode))
|
|
|
|
if(getInputRaw()==BTN_LEFT)
|
|
|
|
ISPandReset();
|
2011-08-02 00:10:15 +00:00
|
|
|
if(getInput()){
|
|
|
|
handleMenu(&mainmenu);
|
|
|
|
getInputWaitRelease();
|
2011-08-02 11:31:57 +00:00
|
|
|
init_nick();
|
2011-08-02 00:10:15 +00:00
|
|
|
};
|
2011-08-02 19:01:27 +00:00
|
|
|
work_queue();
|
2011-08-02 00:10:15 +00:00
|
|
|
fancyNickname();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
void tick_final(void);
|