From 9e076bc3739367cb5ee446f3bd33310c2fd8fa9c Mon Sep 17 00:00:00 2001 From: schneider Date: Tue, 20 Dec 2011 01:53:48 +0100 Subject: [PATCH] added check for 'green' and 'yell0w' files for 1boot --- firmware/l0dable/1boot.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/firmware/l0dable/1boot.c b/firmware/l0dable/1boot.c index 75f9a00..a544663 100644 --- a/firmware/l0dable/1boot.c +++ b/firmware/l0dable/1boot.c @@ -2,6 +2,7 @@ #include "basic/basic.h" #include "basic/config.h" +#include "filesystem/ff.h" #include "lcd/print.h" #include "usetable.h" @@ -34,10 +35,22 @@ static const struct MENU submenu_color={ "r0ket color?", { void ram(void){ bool again = true; + FIL file; menuflags|=(MENU_JUSTONCE|MENU_BIG); screen_intro(); while (again) { color_set = false; + + if( f_open(&file, "yell0w", FA_OPEN_EXISTING|FA_READ) == 0 ){ + yellow(); + color_set = true; + } + + if( f_open(&file, "green", FA_OPEN_EXISTING|FA_READ) == 0 ){ + yellow(); + color_set = true; + } + while (!color_set) { handleMenu(&submenu_color); }