File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
libraries/OTAUpdate/examples Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,10 @@ void setup() {
6767 Serial.println ((int )ret);
6868 return ;
6969 }
70- if (ota.download (OTA_FILE_LOCATION, " /update.bin" ) <= 0 ) {
70+ int ota_size = ota.download (OTA_FILE_LOCATION, " /update.bin" );
71+ if (ota_size <= 0 ) {
7172 Serial.println (" ota.download() error: " );
72- Serial.println (( int )ret );
73+ Serial.println (ota_size );
7374 return ;
7475 }
7576 ret = ota.verify ();
Original file line number Diff line number Diff line change @@ -77,9 +77,10 @@ void setup() {
7777 Serial.println ((int )ret);
7878 return ;
7979 }
80- if (ota.download (OTA_FILE_LOCATION) <= 0 ) {
80+ int ota_size = ota.download (OTA_FILE_LOCATION);
81+ if (ota_size <= 0 ) {
8182 Serial.println (" ota.download() error: " );
82- Serial.println (( int )ret );
83+ Serial.println (ota_size );
8384 return ;
8485 }
8586 ret = ota.verify ();
You can’t perform that action at this time.
0 commit comments