Skip to content
Snippets Groups Projects
Commit ea85141f authored by schneider's avatar schneider
Browse files

Merge branch 'issue104-UIError-update-fail' into 'master'

Fix #104 - Add error message to . Added bootloader specific error splash...

Closes #104

See merge request !193
parents 3e9ff447 556b97ca
No related branches found
No related tags found
1 merge request!193Fix #104 - Add error message to . Added bootloader specific error splash...
Pipeline #3027 passed
...@@ -55,6 +55,21 @@ void bootloader_display_header(void) ...@@ -55,6 +55,21 @@ void bootloader_display_header(void)
bootloader_display_line(2, CARD10_VERSION, white); bootloader_display_line(2, CARD10_VERSION, white);
} }
void bootloader_display_error(char *errtype, char *line1, char *line2)
{
gfx_clear(&display_screen);
Color red = gfx_color(&display_screen, RED);
Color yellow = gfx_color(&display_screen, YELLOW);
Color white = gfx_color(&display_screen, WHITE);
bootloader_display_line(0, "[FATAL ERROR]", red);
bootloader_display_line(1, errtype, yellow);
bootloader_display_line(2, CARD10_VERSION, white);
bootloader_display_line(3, line1, white);
bootloader_display_line(4, line2, white);
}
/* /*
* Display a line of text on the display. * Display a line of text on the display.
*/ */
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
/* Display */ /* Display */
void bootloader_display_init(void); void bootloader_display_init(void);
void bootloader_display_header(void); void bootloader_display_header(void);
void bootloader_display_error(char *errtype, char *line1, char *line2);
void bootloader_display_line(int line, char *string, uint16_t color); void bootloader_display_line(int line, char *string, uint16_t color);
/* USB */ /* USB */
......
...@@ -179,6 +179,9 @@ void flash_partition(void) ...@@ -179,6 +179,9 @@ void flash_partition(void)
data); /* wild cast. not sure if this works */ data); /* wild cast. not sure if this works */
if (ret != E_NO_ERROR) { if (ret != E_NO_ERROR) {
printf("FLC_Write failed with %d\n", ret); printf("FLC_Write failed with %d\n", ret);
bootloader_display_error(
"Firmware Write", "Firmware not", "updated."
);
while (1) while (1)
; ;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment