Skip to content

Commit cb331d8

Browse files
committed
changed title, magnet test with instruction to close the console
1 parent c22119a commit cb331d8

11 files changed

+22
-11
lines changed

funkey_prod_screens.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ TTF_Font *font_title = NULL;
1313
TTF_Font *font_info = NULL;
1414
SDL_Color bg_color = {COLOR_BG_R, COLOR_BG_G, COLOR_BG_B};
1515
SDL_Color text_color = {COLOR_TEXT_R, COLOR_TEXT_G, COLOR_TEXT_B};
16+
char *prog_title = "FUNKEY S TESTS";
1617

1718
/* Static Variables */
1819
static s_prod_test prod_tests[] = {

funkey_prod_screens.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ extern TTF_Font *font_title;
6060
extern TTF_Font *font_info;
6161
extern SDL_Color bg_color;
6262
extern SDL_Color text_color;
63+
char *prog_title;
6364

6465

6566
#endif //__FUNKEY_PROD_SCREENS__

prodScreen_brightnessTest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int launch_prod_screen_brightness(int argc, char *argv[]){
5656
SDL_FillRect(hw_surface, NULL, SDL_MapRGBA(hw_surface->format, bg_color.r, bg_color.g, bg_color.b, 0) );
5757

5858
/* Write Title */
59-
text_surface = TTF_RenderText_Shaded(font_title, "FunKey PCBA Tests", text_color, bg_color);
59+
text_surface = TTF_RenderText_Shaded(font_title, prog_title, text_color, bg_color);
6060
text_pos.x = SCREEN_HORIZONTAL_SIZE/2 - text_surface->w/2;
6161
text_pos.y = Y_PADDING;
6262
SDL_BlitSurface(text_surface, NULL, hw_surface, &text_pos);

prodScreen_buttonsTest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ int launch_prod_screen_buttons(int argc, char *argv[]){
6363
SDL_BlitSurface(img_console_layout, NULL, hw_surface, NULL);
6464

6565
/* Write Title */
66-
text_surface = TTF_RenderText_Shaded(font_title, "FunKey PCBA Tests", text_color, bg_color);
66+
text_surface = TTF_RenderText_Shaded(font_title, prog_title, text_color, bg_color);
6767
text_pos.x = SCREEN_HORIZONTAL_SIZE/2 - text_surface->w/2;
6868
text_pos.y = Y_PADDING;
6969
SDL_BlitSurface(text_surface, NULL, hw_surface, &text_pos);

prodScreen_displayTest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ int launch_prod_screen_display(int argc, char *argv[]){
2525
SDL_FillRect(hw_surface, NULL, SDL_MapRGBA(hw_surface->format, bg_color.r, bg_color.g, bg_color.b, 0) );
2626

2727
/* Write Title */
28-
text_surface = TTF_RenderText_Shaded(font_title, "FUNKEY PCBA TESTS", text_color, bg_color);
28+
text_surface = TTF_RenderText_Shaded(font_title, prog_title, text_color, bg_color);
2929
text_pos.x = SCREEN_HORIZONTAL_SIZE/2 - text_surface->w/2;
3030
text_pos.y = Y_PADDING;
3131
SDL_BlitSurface(text_surface, NULL, hw_surface, &text_pos);

prodScreen_failScreen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ int launch_prod_screen_fail(int argc, char *argv[]){
5757

5858
/* Write Title */
5959
SDL_Color red={255,0,0};
60-
text_surface = TTF_RenderText_Shaded(font_title, "FUNKEY PCBA TESTS", red, bg_color);
60+
text_surface = TTF_RenderText_Shaded(font_title, prog_title, red, bg_color);
6161
text_pos.x = SCREEN_HORIZONTAL_SIZE/2 - text_surface->w/2;
6262
text_pos.y = Y_PADDING;
6363
SDL_BlitSurface(text_surface, NULL, hw_surface, &text_pos);

prodScreen_ledTest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int launch_prod_screen_LED(int argc, char *argv[]){
5555
SDL_FillRect(hw_surface, NULL, SDL_MapRGBA(hw_surface->format, bg_color.r, bg_color.g, bg_color.b, 0) );
5656

5757
/* Write Title */
58-
text_surface = TTF_RenderText_Shaded(font_title, "FunKey PCBA Tests", text_color, bg_color);
58+
text_surface = TTF_RenderText_Shaded(font_title, prog_title, text_color, bg_color);
5959
text_pos.x = SCREEN_HORIZONTAL_SIZE/2 - text_surface->w/2;
6060
text_pos.y = Y_PADDING;
6161
SDL_BlitSurface(text_surface, NULL, hw_surface, &text_pos);

prodScreen_magnetTest.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,25 @@ int launch_prod_screen_magnet(int argc, char *argv[]){
6868
SDL_FillRect(hw_surface, NULL, SDL_MapRGBA(hw_surface->format, bg_color.r, bg_color.g, bg_color.b, 0) );
6969

7070
/* Write Title */
71-
text_surface = TTF_RenderText_Shaded(font_title, "FunKey PCBA Tests", text_color, bg_color);
71+
text_surface = TTF_RenderText_Shaded(font_title, prog_title, text_color, bg_color);
7272
text_pos.x = SCREEN_HORIZONTAL_SIZE/2 - text_surface->w/2;
7373
text_pos.y = Y_PADDING;
7474
SDL_BlitSurface(text_surface, NULL, hw_surface, &text_pos);
7575
SDL_FreeSurface(text_surface);
7676

77-
/* Write "Screen ok ? */
77+
/* Write
78+
" MAGNET TEST
79+
(close the console)*/
80+
int y_pad_tmp = 11;
7881
text_surface = TTF_RenderText_Shaded(font_title, "MAGNET TEST", text_color, bg_color);
7982
text_pos.x = SCREEN_HORIZONTAL_SIZE/2 - text_surface->w/2;
80-
text_pos.y = SCREEN_VERTICAL_SIZE/2 - text_surface->h/2;
83+
text_pos.y = SCREEN_VERTICAL_SIZE/2 - text_surface->h/2 - y_pad_tmp;
84+
SDL_BlitSurface(text_surface, NULL, hw_surface, &text_pos);
85+
SDL_FreeSurface(text_surface);
86+
87+
text_surface = TTF_RenderText_Shaded(font_title, "(close the console)", text_color, bg_color);
88+
text_pos.x = SCREEN_HORIZONTAL_SIZE/2 - text_surface->w/2;
89+
text_pos.y = SCREEN_VERTICAL_SIZE/2 - text_surface->h/2 + y_pad_tmp;
8190
SDL_BlitSurface(text_surface, NULL, hw_surface, &text_pos);
8291
SDL_FreeSurface(text_surface);
8392

prodScreen_speakerTest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int launch_prod_screen_speaker(int argc, char *argv[]){
5656
SDL_FillRect(hw_surface, NULL, SDL_MapRGBA(hw_surface->format, bg_color.r, bg_color.g, bg_color.b, 0) );
5757

5858
/* Write Title */
59-
text_surface = TTF_RenderText_Shaded(font_title, "FunKey PCBA Tests", text_color, bg_color);
59+
text_surface = TTF_RenderText_Shaded(font_title, prog_title, text_color, bg_color);
6060
text_pos.x = SCREEN_HORIZONTAL_SIZE/2 - text_surface->w/2;
6161
text_pos.y = Y_PADDING;
6262
SDL_BlitSurface(text_surface, NULL, hw_surface, &text_pos);

prodScreen_validation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int launch_prod_screen_validation(int argc, char *argv[]){
5656
SDL_FillRect(hw_surface, NULL, SDL_MapRGBA(hw_surface->format, bg_color.r, bg_color.g, bg_color.b, 0) );
5757

5858
/* Write Title */
59-
text_surface = TTF_RenderText_Shaded(font_title, "FUNKEY PCBA TESTS", text_color, bg_color);
59+
text_surface = TTF_RenderText_Shaded(font_title, prog_title, text_color, bg_color);
6060
text_pos.x = SCREEN_HORIZONTAL_SIZE/2 - text_surface->w/2;
6161
text_pos.y = Y_PADDING;
6262
SDL_BlitSurface(text_surface, NULL, hw_surface, &text_pos);

prodScreen_waitBattery.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ int launch_prod_screen_waitbattery(int argc, char *argv[]){
9696
SDL_FillRect(hw_surface, NULL, SDL_MapRGBA(hw_surface->format, bg_color.r, bg_color.g, bg_color.b, 0) );
9797

9898
/* Write Title */
99-
text_surface = TTF_RenderText_Shaded(font_title, "FUNKEY PCBA TESTS", text_color, bg_color);
99+
text_surface = TTF_RenderText_Shaded(font_title, prog_title, text_color, bg_color);
100100
text_pos.x = SCREEN_HORIZONTAL_SIZE/2 - text_surface->w/2;
101101
text_pos.y = Y_PADDING;
102102
SDL_BlitSurface(text_surface, NULL, hw_surface, &text_pos);

0 commit comments

Comments
 (0)