Skip to content

Commit 671e495

Browse files
committed
ESP8266 isn't as advanced as Arduino framework concerning modern C++ usage. Although OTA for ESP8266 is currently no topic this code has had to be adjusted because otherwise the CI tests fail
1 parent 6a26662 commit 671e495

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/utility/ota/OTALogic.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,17 @@
3535
******************************************************************************/
3636

3737
OTALogic::OTALogic(OTAStorage & ota_storage)
38-
: _ota_storage{ota_storage}
38+
: _ota_storage(ota_storage)
3939
, _ota_state{OTAState::Init}
4040
, _ota_error{OTAError::None}
41-
, _mqtt_ota_buf{0, {0}}
42-
, _ota_bin_data{0, 0, 0, crc_init()}
4341
{
42+
memset(_mqtt_ota_buf.buf, 0U, sizeof(_mqtt_ota_buf.buf));
43+
_mqtt_ota_buf.num_bytes = 0;
4444

45+
_ota_bin_data.hdr_len = 0;
46+
_ota_bin_data.hdr_crc32 = 0;
47+
_ota_bin_data.bytes_received = 0;
48+
_ota_bin_data.crc32 = crc_init();
4549
}
4650

4751
/******************************************************************************

0 commit comments

Comments
 (0)