@@ -125,7 +125,7 @@ void OTALogic::onOTADataReceived(uint8_t const * const data, size_t const length
125
125
OTAState OTALogic::handle_Init ()
126
126
{
127
127
#ifndef HOST
128
- DBG_VERBOSE (__PRETTY_FUNCTION__ );
128
+ DBG_VERBOSE (" OTALogic::%s " , __FUNCTION__ );
129
129
#endif
130
130
if (_ota_storage->init ()) {
131
131
return OTAState::Idle;
@@ -146,7 +146,7 @@ OTAState OTALogic::handle_Idle()
146
146
OTAState OTALogic::handle_StartDownload ()
147
147
{
148
148
#ifndef HOST
149
- DBG_VERBOSE (__PRETTY_FUNCTION__ );
149
+ DBG_VERBOSE (" OTALogic::%s " , __FUNCTION__ );
150
150
#endif
151
151
if (_ota_storage->open ()) {
152
152
return OTAState::WaitForHeader;
@@ -159,7 +159,7 @@ OTAState OTALogic::handle_StartDownload()
159
159
OTAState OTALogic::handle_WaitForHeader ()
160
160
{
161
161
#ifndef HOST
162
- DBG_VERBOSE (__PRETTY_FUNCTION__ );
162
+ DBG_VERBOSE (" OTALogic::%s " , __FUNCTION__ );
163
163
#endif
164
164
if (_mqtt_ota_buf.num_bytes >= OTA_BINARY_HEADER_SIZE) {
165
165
return OTAState::HeaderReceived;
@@ -190,8 +190,8 @@ OTAState OTALogic::handle_HeaderReceived()
190
190
_ota_bin_data.hdr_crc32 = ota_header.header .crc32 ;
191
191
192
192
#ifndef HOST
193
- DBG_VERBOSE (" %s: header length = %d" , __PRETTY_FUNCTION__ , _ota_bin_data.hdr_len );
194
- DBG_VERBOSE (" %s: header CRC32 = %d " , __PRETTY_FUNCTION__ , _ota_bin_data.hdr_crc32 );
193
+ DBG_VERBOSE (" OTALogic:: %s: header length = %d" , __FUNCTION__ , _ota_bin_data.hdr_len );
194
+ DBG_VERBOSE (" OTALogic:: %s: header crc32 = %X " , __FUNCTION__ , _ota_bin_data.hdr_crc32 );
195
195
#endif
196
196
197
197
/* Reset the counter which is responsible for keeping tabs on how many bytes have been received */
@@ -234,7 +234,7 @@ OTAState OTALogic::handle_BinaryReceived()
234
234
_mqtt_ota_buf.num_bytes = 0 ;
235
235
236
236
#ifndef HOST
237
- DBG_VERBOSE (" %s: %d bytes written" , __PRETTY_FUNCTION__ , _ota_bin_data.bytes_received );
237
+ DBG_VERBOSE (" OTALogic:: %s: %d bytes written" , __FUNCTION__ , _ota_bin_data.bytes_received );
238
238
#endif
239
239
240
240
if (_ota_bin_data.bytes_received >= _ota_bin_data.hdr_len ) {
@@ -249,7 +249,7 @@ OTAState OTALogic::handle_BinaryReceived()
249
249
OTAState OTALogic::handle_Verify ()
250
250
{
251
251
#ifndef HOST
252
- DBG_VERBOSE (__PRETTY_FUNCTION__ );
252
+ DBG_VERBOSE (" OTALogic::%s " , __FUNCTION__ );
253
253
#endif
254
254
if (_ota_bin_data.crc32 == _ota_bin_data.hdr_crc32 ) {
255
255
return OTAState::Rename;
@@ -263,7 +263,7 @@ OTAState OTALogic::handle_Verify()
263
263
OTAState OTALogic::handle_Rename ()
264
264
{
265
265
#ifndef HOST
266
- DBG_VERBOSE (__PRETTY_FUNCTION__ );
266
+ DBG_VERBOSE (" OTALogic::%s " , __FUNCTION__ );
267
267
#endif
268
268
if (_ota_storage->rename ()) {
269
269
_ota_storage->deinit ();
@@ -286,7 +286,7 @@ OTAState OTALogic::handle_Reset()
286
286
* is started directly.
287
287
*/
288
288
#ifndef HOST
289
- DBG_VERBOSE (__PRETTY_FUNCTION__ );
289
+ DBG_VERBOSE (" OTALogic::%s " , __FUNCTION__ );
290
290
delay (250 );
291
291
#endif
292
292
NVIC_SystemReset ();
0 commit comments