modbus_tcp

Add log if no valid extension is found
This commit is contained in:
2023-11-28 13:08:51 +01:00
parent fe08ae3109
commit f0ac068f51

View File

@@ -108,7 +108,7 @@ static err_t modbus_incoming_data(void* arg, struct tcp_pcb* pcb, struct pbuf* p
} else {
const char* ext = strrchr(file_list[registers[REG_IMAGE_NR] - 1].name, '.');
if (ext == NULL) {
// No valid extension found
LOG_CRIT(TAG, "No valid extension found");
}
if (strcmp(ext, ".gif") == 0) {
lcd_gif_t* gif = lcd_draw_gif_from_fs(file_list[registers[REG_IMAGE_NR] - 1].name, 0, 75); // GIF on screen