Forráskód Böngészése

fix write image response

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 5 éve
szülő
commit
152125ead9
1 módosított fájl, 3 hozzáadás és 2 törlés
  1. 3 2
      Application/app/iap.c

+ 3 - 2
Application/app/iap.c

@@ -56,8 +56,9 @@ static int iap_write_image(uint8_t *data, int len){
 		fmc_write_image(data + 3, len - 3);
 		_write_position += w_pos;
 	}
-	shark_encode_u24(data, w_pos);
-	return 3;
+	data[0] = 0;
+	shark_encode_u24(data+1, w_pos);
+	return 4;
 }
 
 void iap_read_string(can_frame_t *frame)