added check for 'green' and 'yell0w' files for 1boot

This commit is contained in:
schneider 2011-12-20 01:53:48 +01:00
parent 4f9ca4d5b6
commit 9e076bc373
1 changed files with 13 additions and 0 deletions

View File

@ -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);
}