Skip to content

Commit 18f58e8

Browse files
Merge pull request #225 from alexbn71/patch-2
Wake up from sleep
2 parents bb7b711 + 55cfe47 commit 18f58e8

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
Johan Stokking <johan@thethingsnetwork.org>
22
Fokke Zandbergen <mail@fokkezb.nl>
3+
Alessandro Blason <mrblason@gmail.com>

src/TheThingsNetwork.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,3 +958,8 @@ void TheThingsNetwork::sleep(uint32_t mseconds)
958958
modemStream->write(SEND_MSG);
959959
debugPrintLn(buffer);
960960
}
961+
962+
void TheThingsNetwork::wake()
963+
{
964+
autoBaud();
965+
}

src/TheThingsNetwork.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class TheThingsNetwork
9292
ttn_response_t sendBytes(const uint8_t *payload, size_t length, port_t port = 1, bool confirm = false, uint8_t sf = 0);
9393
ttn_response_t poll(port_t port = 1, bool confirm = false);
9494
void sleep(uint32_t mseconds);
95+
void wake();
9596
void saveState();
9697
};
9798

0 commit comments

Comments
 (0)