|
|
|
@ -161,7 +161,7 @@ bool AP_OSD_MAX7456::update_font()
@@ -161,7 +161,7 @@ bool AP_OSD_MAX7456::update_font()
|
|
|
|
|
char fontname[] = "font0.bin"; |
|
|
|
|
last_font = get_font_num(); |
|
|
|
|
fontname[4] = last_font + '0'; |
|
|
|
|
uint8_t *font_data = AP_ROMFS::find_decompress(fontname, font_size); |
|
|
|
|
const uint8_t *font_data = AP_ROMFS::find_decompress(fontname, font_size); |
|
|
|
|
if (font_data == nullptr || font_size != NVM_RAM_SIZE * 256) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
@ -173,7 +173,7 @@ bool AP_OSD_MAX7456::update_font()
@@ -173,7 +173,7 @@ bool AP_OSD_MAX7456::update_font()
|
|
|
|
|
//update char inside max7456 NVM
|
|
|
|
|
if (!update_font_char(chr, chr_font_data)) { |
|
|
|
|
hal.console->printf("AP_OSD: error during font char update\n"); |
|
|
|
|
free(font_data); |
|
|
|
|
AP_ROMFS::free(font_data); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
updated_chars++; |
|
|
|
@ -183,7 +183,7 @@ bool AP_OSD_MAX7456::update_font()
@@ -183,7 +183,7 @@ bool AP_OSD_MAX7456::update_font()
|
|
|
|
|
hal.console->printf("AP_OSD: updated %d symbols.\n", updated_chars); |
|
|
|
|
} |
|
|
|
|
hal.console->printf("AP_OSD: osd font is up to date.\n"); |
|
|
|
|
free(font_data); |
|
|
|
|
AP_ROMFS::free(font_data); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|