mirror of
https://github.com/FunKey-Project/FunKey-ProdScreens.git
synced 2025-12-13 01:08: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 Y_PADDING 10
|
||||||
#define X_PADDING 20
|
#define X_PADDING 20
|
||||||
|
|
||||||
#define FONT_NAME_TITLE "ProdResources/FreeSansBold.ttf"
|
#define FOLDER_RESSOURCES "/usr/local/sbin/ProdResources"
|
||||||
#define FONT_SIZE_TITLE 20
|
#define FONT_NAME_TITLE FOLDER_RESSOURCES"/FreeSansBold.ttf"
|
||||||
#define FONT_NAME_INFO FONT_NAME_TITLE
|
#define FONT_SIZE_TITLE 20
|
||||||
#define FONT_SIZE_INFO 18
|
#define FONT_NAME_INFO FONT_NAME_TITLE
|
||||||
|
#define FONT_SIZE_INFO 18
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
#ifndef __PROD_SCREEN_BUTTONS__
|
#ifndef __PROD_SCREEN_BUTTONS__
|
||||||
#define __PROD_SCREEN_BUTTONS__
|
#define __PROD_SCREEN_BUTTONS__
|
||||||
|
|
||||||
#define IMG_CONSOLE_LAYOUT "ProdResources/funkey_with_buttons.png"
|
#define IMG_CONSOLE_LAYOUT FOLDER_RESSOURCES"/funkey_with_buttons.png"
|
||||||
#define IMG_BUTTON_LR_GREEN "ProdResources/button_LR_green.png"
|
#define IMG_BUTTON_LR_GREEN FOLDER_RESSOURCES"/button_LR_green.png"
|
||||||
#define IMG_BUTTON_NORMAL_GREEN "ProdResources/button_round_green.png"
|
#define IMG_BUTTON_NORMAL_GREEN FOLDER_RESSOURCES"/button_round_green.png"
|
||||||
|
|
||||||
int launch_prod_screen_buttons();
|
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 */
|
/* Sleep for some time */
|
||||||
SDL_Delay(SLEEP_PERIOD_MS);
|
SDL_Delay(SLEEP_PERIOD_MS);
|
||||||
}
|
}
|
||||||
@ -101,7 +104,7 @@ int launch_prod_screen_fail(){
|
|||||||
SDL_FreeSurface(text_surface);
|
SDL_FreeSurface(text_surface);
|
||||||
|
|
||||||
/// Render screen
|
/// Render screen
|
||||||
SDL_Flip(hw_surface);
|
//SDL_Flip(hw_surface);
|
||||||
|
|
||||||
///
|
///
|
||||||
int res = wait_event_loop();
|
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 */
|
/* Sleep for some time */
|
||||||
SDL_Delay(SLEEP_PERIOD_MS);
|
SDL_Delay(SLEEP_PERIOD_MS);
|
||||||
}
|
}
|
||||||
@ -97,7 +100,7 @@ int launch_prod_screen_LED(){
|
|||||||
SDL_FreeSurface(text_surface);
|
SDL_FreeSurface(text_surface);
|
||||||
|
|
||||||
/* Render screen */
|
/* Render screen */
|
||||||
SDL_Flip(hw_surface);
|
//SDL_Flip(hw_surface);
|
||||||
|
|
||||||
///
|
///
|
||||||
int res = wait_event_loop();
|
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 */
|
/* Sleep for some time */
|
||||||
SDL_Delay(SLEEP_PERIOD_MS);
|
SDL_Delay(SLEEP_PERIOD_MS);
|
||||||
}
|
}
|
||||||
@ -99,7 +102,7 @@ int launch_prod_screen_magnet(){
|
|||||||
SDL_FreeSurface(text_surface);*/
|
SDL_FreeSurface(text_surface);*/
|
||||||
|
|
||||||
/// Render screen
|
/// Render screen
|
||||||
SDL_Flip(hw_surface);
|
//SDL_Flip(hw_surface);
|
||||||
|
|
||||||
///
|
///
|
||||||
int res = wait_event_loop();
|
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 */
|
/* Sleep for some time */
|
||||||
SDL_Delay(SLEEP_PERIOD_MS);
|
SDL_Delay(SLEEP_PERIOD_MS);
|
||||||
}
|
}
|
||||||
@ -98,7 +101,7 @@ int launch_prod_screen_speaker(){
|
|||||||
SDL_FreeSurface(text_surface);
|
SDL_FreeSurface(text_surface);
|
||||||
|
|
||||||
/* Render screen */
|
/* Render screen */
|
||||||
SDL_Flip(hw_surface);
|
//SDL_Flip(hw_surface);
|
||||||
|
|
||||||
///
|
///
|
||||||
int res = wait_event_loop();
|
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 */
|
/* Sleep for some time */
|
||||||
SDL_Delay(SLEEP_PERIOD_MS);
|
SDL_Delay(SLEEP_PERIOD_MS);
|
||||||
}
|
}
|
||||||
@ -99,7 +102,7 @@ int launch_prod_screen_validation(){
|
|||||||
SDL_FreeSurface(text_surface);
|
SDL_FreeSurface(text_surface);
|
||||||
|
|
||||||
/// Render screen
|
/// Render screen
|
||||||
SDL_Flip(hw_surface);
|
//SDL_Flip(hw_surface);
|
||||||
|
|
||||||
///
|
///
|
||||||
int res = wait_event_loop();
|
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){
|
if(SDL_GetTicks() - prev_ms > CHECK_BATTERY_DELAY_MS){
|
||||||
|
|
||||||
/* Update time*/
|
/* Update time*/
|
||||||
@ -140,7 +143,7 @@ int launch_prod_screen_waitbattery(){
|
|||||||
SDL_FreeSurface(text_surface);*/
|
SDL_FreeSurface(text_surface);*/
|
||||||
|
|
||||||
/// Render screen
|
/// Render screen
|
||||||
SDL_Flip(hw_surface);
|
//SDL_Flip(hw_surface);
|
||||||
|
|
||||||
///
|
///
|
||||||
int res = wait_event_loop();
|
int res = wait_event_loop();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user