@@ -71,7 +71,6 @@ ArduinoIoTCloudTCP::ArduinoIoTCloudTCP()
71
71
, _shadowTopicIn(" " )
72
72
, _dataTopicOut(" " )
73
73
, _dataTopicIn(" " )
74
- , _ota_topic_in{" " }
75
74
#if OTA_ENABLED
76
75
, _ota_error{static_cast <int >(OTAError::None)}
77
76
, _ota_img_sha256{" Inv." }
@@ -139,7 +138,6 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort)
139
138
_shadowTopicIn = getTopic_shadowin ();
140
139
_dataTopicOut = getTopic_dataout ();
141
140
_dataTopicIn = getTopic_datain ();
142
- _ota_topic_in = getTopic_ota_in ();
143
141
144
142
#if OTA_ENABLED
145
143
addPropertyReal (_ota_error, " OTA_ERROR" , Permission::Read);
@@ -226,17 +224,11 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_SubscribeMqttTopics()
226
224
return State::SubscribeMqttTopics;
227
225
}
228
226
229
- if (!_mqttClient.subscribe (_ota_topic_in))
230
- {
231
- DBG_ERROR (" ArduinoIoTCloudTCP::%s could not subscribe to %s" , __FUNCTION__, _ota_topic_in.c_str ());
232
- return State::SubscribeMqttTopics;
233
- }
234
-
235
227
if (_shadowTopicIn != " " )
236
228
{
237
229
if (!_mqttClient.subscribe (_shadowTopicIn))
238
230
{
239
- DBG_ERROR (" ArduinoIoTCloudTCP::%s could not subscribe to %s" , __FUNCTION__, _ota_topic_in .c_str ());
231
+ DBG_ERROR (" ArduinoIoTCloudTCP::%s could not subscribe to %s" , __FUNCTION__, _shadowTopicIn .c_str ());
240
232
return State::SubscribeMqttTopics;
241
233
}
242
234
}
0 commit comments