File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -570,27 +570,20 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_SubscribeThingTopics()
570
570
return State::SubscribeThingTopics;
571
571
}
572
572
573
- if (_shadowTopicIn != " " )
573
+ if (!_mqttClient. subscribe (_shadowTopicIn) )
574
574
{
575
- if (!_mqttClient.subscribe (_shadowTopicIn))
576
- {
577
- DEBUG_ERROR (" ArduinoIoTCloudTCP::%s could not subscribe to %s" , __FUNCTION__, _shadowTopicIn.c_str ());
575
+ DEBUG_ERROR (" ArduinoIoTCloudTCP::%s could not subscribe to %s" , __FUNCTION__, _shadowTopicIn.c_str ());
578
576
#if !defined(__AVR__)
579
- DEBUG_ERROR (" Check your thing configuration, and press the reset button on your board." );
577
+ DEBUG_ERROR (" Check your thing configuration, and press the reset button on your board." );
580
578
#endif
581
- return State::SubscribeThingTopics;
582
- }
579
+ return State::SubscribeThingTopics;
583
580
}
584
581
585
582
DEBUG_INFO (" Connected to Arduino IoT Cloud" );
586
583
execCloudEventCallback (ArduinoIoTCloudEvent::CONNECT);
587
584
_deviceSubscribedToThing = true ;
588
585
589
- if (_shadowTopicIn != " " )
590
- return State::RequestLastValues;
591
- else
592
- return State::Connected;
593
-
586
+ return State::RequestLastValues;
594
587
}
595
588
596
589
ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_RequestLastValues ()
You can’t perform that action at this time.
0 commit comments