File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -548,26 +548,20 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_SubscribeThingTopics()
548
548
return State::SubscribeThingTopics;
549
549
}
550
550
551
- if (_shadowTopicIn != " " )
551
+ if (!_mqttClient. subscribe (_shadowTopicIn) )
552
552
{
553
- if (!_mqttClient.subscribe (_shadowTopicIn))
554
- {
555
- DEBUG_ERROR (" ArduinoIoTCloudTCP::%s could not subscribe to %s" , __FUNCTION__, _shadowTopicIn.c_str ());
553
+ DEBUG_ERROR (" ArduinoIoTCloudTCP::%s could not subscribe to %s" , __FUNCTION__, _shadowTopicIn.c_str ());
556
554
#if !defined(__AVR__)
557
- DEBUG_ERROR (" Check your thing configuration, and press the reset button on your board." );
555
+ DEBUG_ERROR (" Check your thing configuration, and press the reset button on your board." );
558
556
#endif
559
- return State::SubscribeThingTopics;
560
- }
557
+ return State::SubscribeThingTopics;
561
558
}
562
559
563
560
DEBUG_INFO (" Connected to Arduino IoT Cloud" );
564
561
execCloudEventCallback (ArduinoIoTCloudEvent::CONNECT);
565
562
_deviceSubscribedToThing = true ;
566
563
567
- if (_shadowTopicIn != " " )
568
- return State::RequestLastValues;
569
- else
570
- return State::Connected;
564
+ return State::RequestLastValues;
571
565
}
572
566
573
567
ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_RequestLastValues ()
You can’t perform that action at this time.
0 commit comments