Added support for setImage command for .bmp files
Implemented code for displaying .bmp images with the steImage command.
This commit is contained in:
@@ -119,8 +119,13 @@ static err_t echo_recv( void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t er
|
||||
|
||||
check = 1;
|
||||
}
|
||||
else if( strncmp(tcp_buffer, "setImages", 9) == 0 ) {
|
||||
|
||||
else if( strncmp(tcp_buffer, "setImage", 8) == 0 ) {
|
||||
char filename[len - 8];
|
||||
for (int i = 0; i < len - 9; i++) {
|
||||
filename[i] = tcp_buffer[i+9];
|
||||
}
|
||||
filename[sizeof(filename)-1] = '\0';
|
||||
lcd_draw_img_from_fs(filename, 10, 10);
|
||||
check = 1;
|
||||
}
|
||||
else if( strncmp(tcp_buffer, "exit", 4) == 0 ) {
|
||||
|
||||
Reference in New Issue
Block a user