Added support for gifs
This commit is contained in:
@@ -53,6 +53,8 @@ static void example_publish(mqtt_client_t *client, void *arg) {
|
||||
|
||||
num_files = llfs_file_list(file_list, max_files, "*.bmp");
|
||||
|
||||
strcpy(pub_payload, "\0");
|
||||
|
||||
if(num_files == 0) {
|
||||
strcpy(pub_payload, "No images found");
|
||||
} else {
|
||||
@@ -116,7 +118,12 @@ static void mqtt_incoming_data_cb(void *arg, const u8_t *data, u16_t len, u8_t f
|
||||
case 1:
|
||||
//places an image on the lcd
|
||||
LOG_INFO(TAG, "incoming data on input/setImage: %s.", data_buffer);
|
||||
lcd_draw_img_from_fs((const char*)data_buffer, xpos, ypos);
|
||||
if(data_buffer[len-3] == 'b') {
|
||||
lcd_draw_img_from_fs((const char*)data_buffer, xpos, ypos);
|
||||
}
|
||||
if(data_buffer[len-3] == 'g') {
|
||||
lcd_draw_gif_from_fs((const char*)data_buffer, xpos, ypos);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
//changes the text color on the lcd
|
||||
|
||||
Reference in New Issue
Block a user