SDL_Flip now in while loop, otherwise it was not working on builroot...weird

This commit is contained in:
busebusemac 2020-09-08 18:03:34 +02:00
parent 1f183b9e4d
commit 06165f8a5d
8 changed files with 32 additions and 13 deletions

View File

@ -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
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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