Change lcd_display_text text paramter from const char* to uint8_t* to remove a generated warning
This commit is contained in:
2023-11-12 16:20:30 +01:00
parent 56554dd337
commit 9282f524db
2 changed files with 2 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ void lcd_init(bool bl_on);
* @param[in] bg_color Background color for the text
* @param[in] font Font size, see defines above in file
*/
void lcd_display_text(const char* text, uint16_t x_pos, uint16_t y_pos, uint32_t color, uint32_t bg_color, sFONT *font);
void lcd_display_text(uint8_t* text, uint16_t x_pos, uint16_t y_pos, uint32_t color, uint32_t bg_color, sFONT *font);
/**
* @brief Draw BMP image on screen

View File

@@ -27,7 +27,7 @@ void lcd_init(bool bl_on) {
}
}
void lcd_display_text(const char* text, uint16_t x_pos, uint16_t y_pos, uint32_t color, uint32_t bg_color, sFONT *font) {
void lcd_display_text(uint8_t* text, uint16_t x_pos, uint16_t y_pos, uint32_t color, uint32_t bg_color, sFONT *font) {
uint16_t tot_length = x_pos + (strlen(text) * font->Width);
if ((x_pos % font->Width) != 0) {
x_pos -= (x_pos % font->Width);