Skip to content

Commit 8d4ab67

Browse files
committed
Fix compiling errors associated to WiFi on ESP boards. Fix compiling warning.
1 parent 93a8fb7 commit 8d4ab67

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Thinger.io
3+
Copyright (c) 2021 Thinger.io
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

library.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name=thinger.io
2-
version=2.15.0
3-
author=Alvaro Luis Bustamante <alvarolb@gmail.com>
2+
version=2.16.0
3+
author=Alvaro Luis Bustamante <alvarolb@thinger.io>
44
maintainer=Thinger.io <[email protected]>
55
sentence=Arduino library for the Thinger.io Internet of Things Platform.
66
paragraph=Thinger.io is an open source platform for the Internet of Things. It will allow connecting your things or devices for remote sensing and actuating. Working with several devices like ESP8266, ESP32, Arduino Ethernet, Arduino Wifi, Arduino MKR1000, Arduino GSM1400, Arduino Yun, Adafruit CC3000, Arduino + GSM Modules, Texas Instruments CC3200, ENC28J60, LinkIt ONE.

src/ThingerClient.h

+3
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ class ThingerClient : public thinger::thinger {
327327
case SOCKET_DISCONNECTED:
328328
THINGER_DEBUG("_SOCKET", "Is now closed!");
329329
break;
330+
case SOCKET_ERROR:
331+
THINGER_DEBUG("_SOCKET", "Socket Error");
332+
break;
330333
case SOCKET_TIMEOUT:
331334
THINGER_DEBUG("_SOCKET", "Timeout!");
332335
break;

src/ThingerWifi.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ThingerWifiClient : public ThingerClient {
4343
protected:
4444

4545
virtual bool network_connected(){
46-
return (WiFi.status() == WL_CONNECTED) && !(WiFi.localIP() == INADDR_NONE);
46+
return (WiFi.status() == WL_CONNECTED) && !(WiFi.localIP() == (IPAddress)INADDR_NONE);
4747
}
4848

4949
virtual bool connect_network(){
@@ -69,7 +69,7 @@ class ThingerWifiClient : public ThingerClient {
6969
THINGER_DEBUG("NETWORK", "Connected to WiFi!");
7070
wifi_timeout = millis();
7171
THINGER_DEBUG("NETWORK", "Getting IP Address...");
72-
while (WiFi.localIP() == INADDR_NONE) {
72+
while (WiFi.localIP() == (IPAddress)INADDR_NONE) {
7373
if(millis() - wifi_timeout > 30000) return false;
7474
#ifdef ESP8266
7575
yield();

src/thinger/thinger.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ namespace thinger{
570570
}else{
571571
thing_resource->handle_request(request, response);
572572
// stream enabled over a resource input -> notify the current state
573-
if(thing_resource->stream_enabled() && thing_resource->get_io_type()==thinger_resource::pson_in){
573+
if(thing_resource->stream_enabled() && (thing_resource->get_io_type()==thinger_resource::pson_in || thing_resource->get_io_type()==thinger_resource::pson_in_pson_out)){
574574
// send normal response
575575
send_message(response);
576576
// stream the event to notify the change

0 commit comments

Comments
 (0)