File tree 2 files changed +6
-4
lines changed
libraries/OTAUpdate/examples
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,10 @@ void setup() {
67
67
Serial.println ((int )ret);
68
68
return ;
69
69
}
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 ) {
71
72
Serial.println (" ota.download() error: " );
72
- Serial.println (( int )ret );
73
+ Serial.println (ota_size );
73
74
return ;
74
75
}
75
76
ret = ota.verify ();
Original file line number Diff line number Diff line change @@ -77,9 +77,10 @@ void setup() {
77
77
Serial.println ((int )ret);
78
78
return ;
79
79
}
80
- if (ota.download (OTA_FILE_LOCATION) <= 0 ) {
80
+ int ota_size = ota.download (OTA_FILE_LOCATION);
81
+ if (ota_size <= 0 ) {
81
82
Serial.println (" ota.download() error: " );
82
- Serial.println (( int )ret );
83
+ Serial.println (ota_size );
83
84
return ;
84
85
}
85
86
ret = ota.verify ();
You can’t perform that action at this time.
0 commit comments