Skip to content

Commit 7415f12

Browse files
committed
Removing no longer needed OTA IN TOPIC for binary reception
1 parent e3cd201 commit 7415f12

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/ArduinoIoTCloudTCP.cpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ ArduinoIoTCloudTCP::ArduinoIoTCloudTCP()
7171
, _shadowTopicIn("")
7272
, _dataTopicOut("")
7373
, _dataTopicIn("")
74-
, _ota_topic_in{""}
7574
#if OTA_ENABLED
7675
, _ota_error{static_cast<int>(OTAError::None)}
7776
, _ota_img_sha256{"Inv."}
@@ -139,7 +138,6 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort)
139138
_shadowTopicIn = getTopic_shadowin();
140139
_dataTopicOut = getTopic_dataout();
141140
_dataTopicIn = getTopic_datain();
142-
_ota_topic_in = getTopic_ota_in();
143141

144142
#if OTA_ENABLED
145143
addPropertyReal(_ota_error, "OTA_ERROR", Permission::Read);
@@ -226,17 +224,11 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_SubscribeMqttTopics()
226224
return State::SubscribeMqttTopics;
227225
}
228226

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-
235227
if (_shadowTopicIn != "")
236228
{
237229
if (!_mqttClient.subscribe(_shadowTopicIn))
238230
{
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());
240232
return State::SubscribeMqttTopics;
241233
}
242234
}

src/ArduinoIoTCloudTCP.h

-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
115115
String _shadowTopicIn;
116116
String _dataTopicOut;
117117
String _dataTopicIn;
118-
String _ota_topic_in;
119118

120119
#if OTA_ENABLED
121120
int _ota_error;
@@ -130,7 +129,6 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
130129
inline String getTopic_shadowin () { return ( getThingId().length() == 0) ? String("") : String("/a/t/" + getThingId() + "/shadow/i"); }
131130
inline String getTopic_dataout () { return ( getThingId().length() == 0) ? String("/a/d/" + getDeviceId() + "/e/o") : String("/a/t/" + getThingId() + "/e/o"); }
132131
inline String getTopic_datain () { return ( getThingId().length() == 0) ? String("/a/d/" + getDeviceId() + "/e/i") : String("/a/t/" + getThingId() + "/e/i"); }
133-
inline String getTopic_ota_in () { return String("/a/d/" + getDeviceId() + "/ota/i"); }
134132

135133
State handle_ConnectPhy();
136134
State handle_SyncTime();

0 commit comments

Comments
 (0)