Skip to content

Commit e5d266e

Browse files
committed
remove updatePhy state to ArduinoIoTCloudTCP
1 parent 80d4253 commit e5d266e

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

src/ArduinoIoTCloudTCP.cpp

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ void ArduinoIoTCloudTCP::update()
211211
switch (_state)
212212
{
213213
case State::ConfigPhy: next_state = handle_ConfigPhy(); break;
214-
case State::updatePhy: next_state = handle_updatePhy(); break;
215214
case State::Init: next_state = handle_Init(); break;
216215
case State::ConnectPhy: next_state = handle_ConnectPhy(); break;
217216
case State::SyncTime: next_state = handle_SyncTime(); break;
@@ -236,7 +235,7 @@ void ArduinoIoTCloudTCP::update()
236235
*/
237236
#if NETWORK_CONFIGURATOR_ENABLED
238237
if(_configurator != nullptr && _state > State::Init && _configurator->update() == NetworkConfiguratorStates::UPDATING_CONFIG){
239-
_state = State::updatePhy;
238+
_state = State::ConfigPhy;
240239
}
241240
#endif
242241

@@ -310,21 +309,6 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_ConfigPhy()
310309

311310
}
312311

313-
ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_updatePhy()
314-
{
315-
#if NETWORK_CONFIGURATOR_ENABLED
316-
if(_configurator != nullptr && _configurator->update() == NetworkConfiguratorStates::CONFIGURED){
317-
_configurator->disconnectAgent();
318-
// Go to Connected state since the connectionHandler obj doesn't change
319-
return State::Connected;
320-
}
321-
322-
return State::updatePhy;
323-
#else
324-
return State::Connected;
325-
#endif
326-
}
327-
328312
ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_Init()
329313
{
330314
/* Setup broker TLS client */

src/ArduinoIoTCloudTCP.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
122122
enum class State
123123
{
124124
ConfigPhy,
125-
updatePhy,
126125
Init,
127126
ConnectPhy,
128127
SyncTime,
@@ -179,7 +178,6 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
179178
inline String getTopic_datain () { return ( getThingId().length() == 0) ? String("") : String("/a/t/" + getThingId() + "/e/i"); }
180179

181180
State handle_ConfigPhy();
182-
State handle_updatePhy();
183181
State handle_Init();
184182
State handle_ConnectPhy();
185183
State handle_SyncTime();

0 commit comments

Comments
 (0)