From 9da6d74f2eb063bd006e1450b07dda0fb99d3ab9 Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Thu, 4 Aug 2011 17:20:24 +0200 Subject: [PATCH] Use 1boot loadable for real --- firmware/applications/final.c | 16 ++++++++++++++++ firmware/l0dable/1boot.c | 5 +---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/firmware/applications/final.c b/firmware/applications/final.c index cce4e3b..b46a770 100644 --- a/firmware/applications/final.c +++ b/firmware/applications/final.c @@ -8,6 +8,8 @@ #include "basic/ecc.h" +#include "basic/config.h" + /**************************************************************************/ #include "final.gen" @@ -16,6 +18,20 @@ void init_nick(); void fancyNickname(); void main_final(void) { + if(GLOBAL(privacy)>2){ //firstboot + if(execute_file("1boot.int",0,0)){ + lcdPrintln("Badge SETUP"); + lcdPrintln("error."); + lcdPrintln("Features may"); + lcdPrintln("be broken."); + lcdRefresh(); + getInputWait(); + getInputWaitRelease(); + GLOBAL(privacy)=0; + }else{ + saveConfig(); + }; + }; //checkFirstBoot(); init_final(); menuflags|=MENU_TIMEOUT; diff --git a/firmware/l0dable/1boot.c b/firmware/l0dable/1boot.c index cf8ce62..b45bc95 100644 --- a/firmware/l0dable/1boot.c +++ b/firmware/l0dable/1boot.c @@ -23,10 +23,7 @@ static const struct MENU submenu_privacy={ "Privacy?", { void ram(void){ // check privacy menuflags|=MENU_JUSTONCE; - if ((GLOBAL(privacy)!=3)) { //TODO Change! - handleMenu(&submenu_privacy); - } - + handleMenu(&submenu_privacy); menuflags&= (~MENU_JUSTONCE); };