diff --git a/funkey_prod_screens.h b/funkey_prod_screens.h index 7767a6d..befccde 100644 --- a/funkey_prod_screens.h +++ b/funkey_prod_screens.h @@ -34,10 +34,11 @@ #define Y_PADDING 10 #define X_PADDING 20 -#define FONT_NAME_TITLE "ProdResources/FreeSansBold.ttf" -#define FONT_SIZE_TITLE 20 -#define FONT_NAME_INFO FONT_NAME_TITLE -#define FONT_SIZE_INFO 18 +#define FOLDER_RESSOURCES "/usr/local/sbin/ProdResources" +#define FONT_NAME_TITLE FOLDER_RESSOURCES"/FreeSansBold.ttf" +#define FONT_SIZE_TITLE 20 +#define FONT_NAME_INFO FONT_NAME_TITLE +#define FONT_SIZE_INFO 18 typedef struct { diff --git a/prodScreen_buttonsTest.h b/prodScreen_buttonsTest.h index a1e7339..56cf6c5 100644 --- a/prodScreen_buttonsTest.h +++ b/prodScreen_buttonsTest.h @@ -1,9 +1,9 @@ #ifndef __PROD_SCREEN_BUTTONS__ #define __PROD_SCREEN_BUTTONS__ -#define IMG_CONSOLE_LAYOUT "ProdResources/funkey_with_buttons.png" -#define IMG_BUTTON_LR_GREEN "ProdResources/button_LR_green.png" -#define IMG_BUTTON_NORMAL_GREEN "ProdResources/button_round_green.png" +#define IMG_CONSOLE_LAYOUT FOLDER_RESSOURCES"/funkey_with_buttons.png" +#define IMG_BUTTON_LR_GREEN FOLDER_RESSOURCES"/button_LR_green.png" +#define IMG_BUTTON_NORMAL_GREEN FOLDER_RESSOURCES"/button_round_green.png" int launch_prod_screen_buttons(); diff --git a/prodScreen_failScreen.c b/prodScreen_failScreen.c index bc54112..13dd3b4 100644 --- a/prodScreen_failScreen.c +++ b/prodScreen_failScreen.c @@ -38,6 +38,9 @@ static int wait_event_loop(){ } } + /* To inverstigate but with Buildroot, we need this: */ + SDL_Flip(hw_surface); + /* Sleep for some time */ SDL_Delay(SLEEP_PERIOD_MS); } @@ -101,7 +104,7 @@ int launch_prod_screen_fail(){ SDL_FreeSurface(text_surface); /// Render screen - SDL_Flip(hw_surface); + //SDL_Flip(hw_surface); /// int res = wait_event_loop(); diff --git a/prodScreen_ledTest.c b/prodScreen_ledTest.c index a9688c9..9cd1ce6 100644 --- a/prodScreen_ledTest.c +++ b/prodScreen_ledTest.c @@ -37,6 +37,9 @@ static int wait_event_loop(){ } } + /* To inverstigate but with Buildroot, we need this: */ + SDL_Flip(hw_surface); + /* Sleep for some time */ SDL_Delay(SLEEP_PERIOD_MS); } @@ -97,7 +100,7 @@ int launch_prod_screen_LED(){ SDL_FreeSurface(text_surface); /* Render screen */ - SDL_Flip(hw_surface); + //SDL_Flip(hw_surface); /// int res = wait_event_loop(); diff --git a/prodScreen_magnetTest.c b/prodScreen_magnetTest.c index 34cb902..f3b8b2d 100644 --- a/prodScreen_magnetTest.c +++ b/prodScreen_magnetTest.c @@ -38,6 +38,9 @@ static int wait_event_loop(){ } } + /* To inverstigate but with Buildroot, we need this: */ + SDL_Flip(hw_surface); + /* Sleep for some time */ SDL_Delay(SLEEP_PERIOD_MS); } @@ -99,7 +102,7 @@ int launch_prod_screen_magnet(){ SDL_FreeSurface(text_surface);*/ /// Render screen - SDL_Flip(hw_surface); + //SDL_Flip(hw_surface); /// int res = wait_event_loop(); diff --git a/prodScreen_speakerTest.c b/prodScreen_speakerTest.c index fac4726..f083339 100644 --- a/prodScreen_speakerTest.c +++ b/prodScreen_speakerTest.c @@ -38,6 +38,9 @@ static int wait_event_loop(){ } } + /* To inverstigate but with Buildroot, we need this: */ + SDL_Flip(hw_surface); + /* Sleep for some time */ SDL_Delay(SLEEP_PERIOD_MS); } @@ -98,7 +101,7 @@ int launch_prod_screen_speaker(){ SDL_FreeSurface(text_surface); /* Render screen */ - SDL_Flip(hw_surface); + //SDL_Flip(hw_surface); /// int res = wait_event_loop(); diff --git a/prodScreen_validation.c b/prodScreen_validation.c index 28562d1..e6f76ac 100644 --- a/prodScreen_validation.c +++ b/prodScreen_validation.c @@ -38,6 +38,9 @@ static int wait_event_loop(){ } } + /* To inverstigate but with Buildroot, we need this: */ + SDL_Flip(hw_surface); + /* Sleep for some time */ SDL_Delay(SLEEP_PERIOD_MS); } @@ -99,7 +102,7 @@ int launch_prod_screen_validation(){ SDL_FreeSurface(text_surface); /// Render screen - SDL_Flip(hw_surface); + //SDL_Flip(hw_surface); /// int res = wait_event_loop(); diff --git a/prodScreen_waitBattery.c b/prodScreen_waitBattery.c index ba75f16..7af7448 100644 --- a/prodScreen_waitBattery.c +++ b/prodScreen_waitBattery.c @@ -66,6 +66,9 @@ static int wait_event_loop(){ } } + /* To inverstigate but with Buildroot, we need this: */ + SDL_Flip(hw_surface); + if(SDL_GetTicks() - prev_ms > CHECK_BATTERY_DELAY_MS){ /* Update time*/ @@ -140,7 +143,7 @@ int launch_prod_screen_waitbattery(){ SDL_FreeSurface(text_surface);*/ /// Render screen - SDL_Flip(hw_surface); + //SDL_Flip(hw_surface); /// int res = wait_event_loop();