@@ -134,17 +134,17 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort)
134134 #ifdef BOARD_HAS_ECCX08
135135 if (!ECCX08.begin ())
136136 {
137- DEBUG_ERROR (F ( " Cryptography processor failure. Make sure you have a compatible board." ) );
137+ DEBUG_ERROR (" Cryptography processor failure. Make sure you have a compatible board." );
138138 return 0 ;
139139 }
140140 if (!CryptoUtil::readDeviceId (ECCX08, getDeviceId (), ECCX08Slot::DeviceId))
141141 {
142- DEBUG_ERROR (F ( " Cryptography processor read failure." ) );
142+ DEBUG_ERROR (" Cryptography processor read failure." );
143143 return 0 ;
144144 }
145145 if (!CryptoUtil::reconstructCertificate (_eccx08_cert, getDeviceId (), ECCX08Slot::Key, ECCX08Slot::CompressedCertificate, ECCX08Slot::SerialNumberAndAuthorityKeyIdentifier))
146146 {
147- DEBUG_ERROR (F ( " Cryptography certificate reconstruction failure." ) );
147+ DEBUG_ERROR (" Cryptography certificate reconstruction failure." );
148148 return 0 ;
149149 }
150150 _sslClient.setClient (_connection->getClient ());
@@ -181,7 +181,7 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort)
181181 String const nina_fw_version = WiFi.firmwareVersion ();
182182 if (nina_fw_version < " 1.4.1" ) {
183183 _ota_cap = false ;
184- DEBUG_WARNING (F ( " ArduinoIoTCloudTCP::%s In order to be ready for cloud OTA, NINA firmware needs to be >= 1.4.1, current %s" ) , __FUNCTION__, nina_fw_version.c_str ());
184+ DEBUG_WARNING (" ArduinoIoTCloudTCP::%s In order to be ready for cloud OTA, NINA firmware needs to be >= 1.4.1, current %s" , __FUNCTION__, nina_fw_version.c_str ());
185185 }
186186 else {
187187 _ota_cap = true ;
@@ -218,10 +218,10 @@ int ArduinoIoTCloudTCP::connected()
218218
219219void ArduinoIoTCloudTCP::printDebugInfo ()
220220{
221- DEBUG_INFO (F ( " ***** Arduino IoT Cloud - configuration info *****" ) );
222- DEBUG_INFO (F ( " Device ID: %s" ) , getDeviceId ().c_str ());
223- DEBUG_INFO (F ( " Thing ID: %s" ) , getThingId ().c_str ());
224- DEBUG_INFO (F ( " MQTT Broker: %s:%d" ) , _brokerAddress.c_str (), _brokerPort);
221+ DEBUG_INFO (" ***** Arduino IoT Cloud - configuration info *****" );
222+ DEBUG_INFO (" Device ID: %s" , getDeviceId ().c_str ());
223+ DEBUG_INFO (" Thing ID: %s" , getThingId ().c_str ());
224+ DEBUG_INFO (" MQTT Broker: %s:%d" , _brokerAddress.c_str (), _brokerPort);
225225}
226226
227227/* *****************************************************************************
@@ -239,7 +239,7 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_ConnectPhy()
239239ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_SyncTime ()
240240{
241241 unsigned long const internal_posix_time = _time_service.getTime ();
242- DEBUG_VERBOSE (F ( " ArduinoIoTCloudTCP::%s internal clock configured to posix timestamp %d" ) , __FUNCTION__, internal_posix_time);
242+ DEBUG_VERBOSE (" ArduinoIoTCloudTCP::%s internal clock configured to posix timestamp %d" , __FUNCTION__, internal_posix_time);
243243 return State::ConnectMqttBroker;
244244}
245245
@@ -248,30 +248,30 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_ConnectMqttBroker()
248248 if (_mqttClient.connect (_brokerAddress.c_str (), _brokerPort))
249249 return State::SubscribeMqttTopics;
250250
251- DEBUG_ERROR (F ( " ArduinoIoTCloudTCP::%s could not connect to %s:%d" ) , __FUNCTION__, _brokerAddress.c_str (), _brokerPort);
251+ DEBUG_ERROR (" ArduinoIoTCloudTCP::%s could not connect to %s:%d" , __FUNCTION__, _brokerAddress.c_str (), _brokerPort);
252252 return State::ConnectPhy;
253253}
254254
255255ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_SubscribeMqttTopics ()
256256{
257257 if (!_mqttClient.subscribe (_dataTopicIn))
258258 {
259- DEBUG_ERROR (F ( " ArduinoIoTCloudTCP::%s could not subscribe to %s" ) , __FUNCTION__, _dataTopicIn.c_str ());
260- DEBUG_ERROR (F ( " Check your thing configuration, and press the reset button on your board." ) );
259+ DEBUG_ERROR (" ArduinoIoTCloudTCP::%s could not subscribe to %s" , __FUNCTION__, _dataTopicIn.c_str ());
260+ DEBUG_ERROR (" Check your thing configuration, and press the reset button on your board." );
261261 return State::SubscribeMqttTopics;
262262 }
263263
264264 if (_shadowTopicIn != " " )
265265 {
266266 if (!_mqttClient.subscribe (_shadowTopicIn))
267267 {
268- DEBUG_ERROR (F ( " ArduinoIoTCloudTCP::%s could not subscribe to %s" ) , __FUNCTION__, _shadowTopicIn.c_str ());
269- DEBUG_ERROR (F ( " Check your thing configuration, and press the reset button on your board." ) );
268+ DEBUG_ERROR (" ArduinoIoTCloudTCP::%s could not subscribe to %s" , __FUNCTION__, _shadowTopicIn.c_str ());
269+ DEBUG_ERROR (" Check your thing configuration, and press the reset button on your board." );
270270 return State::SubscribeMqttTopics;
271271 }
272272 }
273273
274- DEBUG_INFO (F ( " Connected to Arduino IoT Cloud" ) );
274+ DEBUG_INFO (" Connected to Arduino IoT Cloud" );
275275 execCloudEventCallback (ArduinoIoTCloudEvent::CONNECT);
276276
277277 if (_shadowTopicIn != " " )
@@ -286,7 +286,7 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_RequestLastValues()
286286 unsigned long const now = millis ();
287287 if ((now - _lastSyncRequestTickTime) > TIMEOUT_FOR_LASTVALUES_SYNC)
288288 {
289- DEBUG_VERBOSE (F ( " ArduinoIoTCloudTCP::%s [%d] last values requested" ) , __FUNCTION__, now);
289+ DEBUG_VERBOSE (" ArduinoIoTCloudTCP::%s [%d] last values requested" , __FUNCTION__, now);
290290 requestLastValue ();
291291 _lastSyncRequestTickTime = now;
292292 }
@@ -298,7 +298,7 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_Connected()
298298{
299299 if (!_mqttClient.connected ())
300300 {
301- DEBUG_ERROR (F ( " ArduinoIoTCloudTCP::%s MQTT client connection lost" ) , __FUNCTION__);
301+ DEBUG_ERROR (" ArduinoIoTCloudTCP::%s MQTT client connection lost" , __FUNCTION__);
302302
303303 /* Forcefully disconnect MQTT client and trigger a reconnection. */
304304 _mqttClient.stop ();
@@ -378,7 +378,7 @@ void ArduinoIoTCloudTCP::handleMessage(int length)
378378
379379 if ((_shadowTopicIn == topic) && (_state == State::RequestLastValues))
380380 {
381- DEBUG_VERBOSE (F ( " ArduinoIoTCloudTCP::%s [%d] last values received" ) , __FUNCTION__, millis ());
381+ DEBUG_VERBOSE (" ArduinoIoTCloudTCP::%s [%d] last values received" , __FUNCTION__, millis ());
382382 CBORDecoder::decode (_property_container, (uint8_t *)bytes, length, true );
383383 sendPropertiesToCloud ();
384384 execCloudEventCallback (ArduinoIoTCloudEvent::SYNC);
@@ -428,7 +428,7 @@ int ArduinoIoTCloudTCP::write(String const topic, byte const data[], int const l
428428#if OTA_ENABLED
429429void ArduinoIoTCloudTCP::onOTARequest ()
430430{
431- DEBUG_VERBOSE (F ( " ArduinoIoTCloudTCP::%s _ota_url = %s" ), __FUNCTION__, _ota_url.c_str ());
431+ DEBUG_VERBOSE (" ArduinoIoTCloudTCP::%s _ota_url = %s" ), __FUNCTION__, _ota_url.c_str ());
432432
433433 /* Status flag to prevent the reset from being executed
434434 * when HTTPS download is not supported.
@@ -444,7 +444,7 @@ void ArduinoIoTCloudTCP::onOTARequest()
444444 uint8_t nina_ota_err_code = 0 ;
445445 if (!WiFiStorage.downloadOTA (_ota_url.c_str (), &nina_ota_err_code))
446446 {
447- DEBUG_ERROR (F ( " ArduinoIoTCloudTCP::%s error download to nina: %d" ), __FUNCTION__, nina_ota_err_code);
447+ DEBUG_ERROR (" ArduinoIoTCloudTCP::%s error download to nina: %d" ), __FUNCTION__, nina_ota_err_code);
448448 _ota_error = static_cast <int >(OTAError::DownloadFailed);
449449 return ;
450450 }
0 commit comments