mirror of
https://github.com/FunKey-Project/FunKey-ProdScreens.git
synced 2025-12-12 16:58:50 +01:00
SDL_Flip now in while loop, otherwise it was not working on builroot...weird
This commit is contained in:
parent
1f183b9e4d
commit
06165f8a5d
@ -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
|
||||
{
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user