|
|
|
@ -43,7 +43,8 @@ void AP_OSD_SITL::load_font(void)
@@ -43,7 +43,8 @@ void AP_OSD_SITL::load_font(void)
|
|
|
|
|
{ |
|
|
|
|
uint32_t font_size; |
|
|
|
|
char fontname[] = "font0.bin"; |
|
|
|
|
fontname[4] = get_font_num() + '0'; |
|
|
|
|
last_font = get_font_num(); |
|
|
|
|
fontname[4] = last_font + '0'; |
|
|
|
|
uint8_t *font_data = AP_ROMFS::find_decompress(fontname, font_size); |
|
|
|
|
if (font_data == nullptr || font_size != 54 * 256) { |
|
|
|
|
AP_HAL::panic("Bad font file"); |
|
|
|
@ -173,6 +174,9 @@ void AP_OSD_SITL::update_thread(void)
@@ -173,6 +174,9 @@ void AP_OSD_SITL::update_thread(void)
|
|
|
|
|
|
|
|
|
|
blink = (blink+1) % 4; |
|
|
|
|
w->display(); |
|
|
|
|
if (last_font != get_font_num()) { |
|
|
|
|
load_font(); |
|
|
|
|
} |
|
|
|
|
usleep(10000); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|