Merge branch 'main' into MQTT
This commit is contained in:
@@ -84,7 +84,7 @@ void lcd_task(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void lcd_display_text(const char* text, uint16_t x_pos, uint16_t y_pos, uint32_t color, sFONT* font) {
|
||||
void lcd_display_text(const char* text, uint16_t x_pos, uint16_t y_pos, uint32_t color, uint32_t bg_color, sFONT* font) {
|
||||
BSP_LCD_SelectLayer(1);
|
||||
LOG_INFO(TAG, "Display text: %s @x=%d,y=%d", text, x_pos, y_pos);
|
||||
|
||||
@@ -94,7 +94,7 @@ void lcd_display_text(const char* text, uint16_t x_pos, uint16_t y_pos, uint32_t
|
||||
}
|
||||
|
||||
BSP_LCD_SetTextColor(color);
|
||||
BSP_LCD_SetBackColor(0);
|
||||
BSP_LCD_SetBackColor(bg_color);
|
||||
BSP_LCD_SetFont(font);
|
||||
|
||||
if (tot_length > BSP_LCD_GetXSize()) {
|
||||
@@ -186,6 +186,11 @@ void lcd_clear_images(void) {
|
||||
BSP_LCD_Clear(0);
|
||||
}
|
||||
|
||||
void lcd_set_bg_color_layer0(uint32_t color){
|
||||
BSP_LCD_SelectLayer(0);
|
||||
BSP_LCD_Clear(color);
|
||||
}
|
||||
|
||||
void lcd_stop_all_gifs(void) {
|
||||
for (uint8_t i = 0; i < LCD_MAX_GIFS; i++) {
|
||||
if (gifs[i].src != NULL) {
|
||||
|
||||
@@ -167,7 +167,7 @@ void tftp_close(void* handle) {
|
||||
if (handle == &virt_file[VIRT_TEXT_TXT]) {
|
||||
lcd_clear_images();
|
||||
lcd_clear_text();
|
||||
lcd_display_text((uint8_t*)virt_file[VIRT_TEXT_TXT].data, 0, 0, LCD_COLOR_WHITE, LCD_FONT16);
|
||||
lcd_display_text((uint8_t*)virt_file[VIRT_TEXT_TXT].data, 0, 0, LCD_COLOR_WHITE, LCD_TRANSPARENT, LCD_FONT16);
|
||||
}
|
||||
|
||||
if (handle == &virt_file[VIRT_INDEX_TXT] || handle == &virt_file[VIRT_IMAGE_BMP]
|
||||
@@ -321,4 +321,4 @@ void tftp_server_deinit(void) {
|
||||
|
||||
virt_file[VIRT_TEXT_TXT].data = NULL;
|
||||
virt_file[VIRT_TEXT_TXT].len = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user