Skip to content

Commit

Permalink
fixed UDP problems on ESP32
Browse files Browse the repository at this point in the history
  • Loading branch information
sivar2311 committed Oct 22, 2019
1 parent 9b8cc74 commit d2fec40
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"maintainer": true
}
],
"version": "2.0.4",
"version": "2.0.5",
"frameworks": "arduino",
"platforms": [
"espressif8266",
Expand Down
6 changes: 3 additions & 3 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name=SinricPro
version=2.0.4
author=Boris Jäger <[email protected]>
maintainer=Boris Jäger <[email protected]>
version=2.0.5
author=Boris Jaeger <[email protected]>
maintainer=Boris Jaeger <[email protected]>
sentence=An Arduino SDK for https://sinric.pro
paragraph=Simple way to control your IOT development boards like ESP8226 or ESP32 with Amazon Alexa or Google Home
category=Communication
Expand Down
1 change: 0 additions & 1 deletion src/SinricPro.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ void SinricProClass::handle() {
if (!isConnected()) connect();
_websocketListener.handle();
_udpListener.handle();
_ntp.update();

handleRequest();
handleSendQueue();
Expand Down
5 changes: 3 additions & 2 deletions src/SinricProUDP.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ void udpListener::begin(SinricProQueue_t* receiveQueue) {
}

void udpListener::handle() {
if (!_udp.available()) return;
int len = _udp.parsePacket();
if (len) {

char buffer[512];
int n = _udp.read(buffer, 512);
char buffer[1024];
int n = _udp.read(buffer, 1024);
buffer[n] = 0;
SinricProMessage* request = new SinricProMessage(IF_UDP, buffer);
DEBUG_SINRIC("[SinricPro:UDP]: receiving request\r\n");
Expand Down

0 comments on commit d2fec40

Please sign in to comment.