Skip to content

Commit 657b53e

Browse files
committed
change the busywait in run() to 100 ms
1 parent 76ef666 commit 657b53e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

AdafruitIO.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@ const __FlashStringHelper* AdafruitIO::statusText()
145145
}
146146
}
147147

148-
void AdafruitIO::run()
148+
void AdafruitIO::run(uint16_t busywait_ms)
149149
{
150150
// loop until we have a connection
151151
while(mqttStatus() != AIO_CONNECTED){}
152152

153-
_mqtt->processPackets(1000);
153+
_mqtt->processPackets(busywait_ms);
154154

155155
// ping to keep connection alive if needed
156156
if(millis() > (_last_ping + AIO_PING_INTERVAL)) {

AdafruitIO.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class AdafruitIO {
3333
void connect(const char *user, const char *key);
3434
void connect(const __FlashStringHelper *user, const __FlashStringHelper *key);
3535

36-
void run();
36+
void run(uint16_t busywait_ms = 100);
3737

3838
AdafruitIO_Feed* feed(const char *name);
3939
AdafruitIO_Feed* feed(const __FlashStringHelper *name);

0 commit comments

Comments
 (0)