Skip to content

Commit 8383de1

Browse files
committed
Shortening error messages to conserve flash and eliminate unneccsary error messages.
1 parent 577f305 commit 8383de1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ArduinoIoTCloudTCP.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort)
129129
#ifdef BOARD_HAS_OFFLOADED_ECCX08
130130
if (!ECCX08.begin())
131131
{
132-
DEBUG_ERROR("Cryptography processor failure. Make sure you have a compatible board.");
132+
DEBUG_ERROR("ECCX08.begin() failed.");
133133
return 0;
134134
}
135135
if (!CryptoUtil::readDeviceId(ECCX08, getDeviceId(), ECCX08Slot::DeviceId))
136136
{
137-
DEBUG_ERROR("Cryptography processor read failure.");
137+
DEBUG_ERROR("CryptoUtil::readDeviceId(...) failed.");
138138
return 0;
139139
}
140140
ECCX08.end();
@@ -266,7 +266,9 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_SubscribeMqttTopics()
266266
if (!_mqttClient.subscribe(_dataTopicIn))
267267
{
268268
DEBUG_ERROR("ArduinoIoTCloudTCP::%s could not subscribe to %s", __FUNCTION__, _dataTopicIn.c_str());
269+
#if !defined(__AVR__)
269270
DEBUG_ERROR("Check your thing configuration, and press the reset button on your board.");
271+
#endif
270272
return State::SubscribeMqttTopics;
271273
}
272274

@@ -275,7 +277,9 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_SubscribeMqttTopics()
275277
if (!_mqttClient.subscribe(_shadowTopicIn))
276278
{
277279
DEBUG_ERROR("ArduinoIoTCloudTCP::%s could not subscribe to %s", __FUNCTION__, _shadowTopicIn.c_str());
280+
#if !defined(__AVR__)
278281
DEBUG_ERROR("Check your thing configuration, and press the reset button on your board.");
282+
#endif
279283
return State::SubscribeMqttTopics;
280284
}
281285
}

0 commit comments

Comments
 (0)