0

Fixed parentheses issue with IOT Digital Sketch
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Fixed parentheses issue with IOT Digital Sketch

by daveNC on Fri Feb 15, 2019 11:09 pm

I got this error and seem to fix it by adding ( ) thusly:

if (!(iClient->connect(iServerName, iServerPort) > 0))
same for the second error.


...Arduino/libraries/ArduinoHttpClient/src/HttpClient.cpp: In member function 'int HttpClient::startRequest(const char*, const char*, const char*, int, const byte*)':
/Users/DavidRossi/Documents/Arduino/libraries/ArduinoHttpClient/src/HttpClient.cpp:87:61: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
if (!iClient->connect(iServerName, iServerPort) > 0)
^
...Arduino/libraries/ArduinoHttpClient/src/HttpClient.cpp:97:64: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
if (!iClient->connect(iServerAddress, iServerPort) > 0)
^
Last edited by daveNC on Fri Feb 15, 2019 11:44 pm, edited 1 time in total.

daveNC
 
Posts: 26
Joined: Thu Nov 09, 2017 2:32 pm

Re: Please help with HUZZAH32 and IOT Digital Sketch example

by daveNC on Fri Feb 15, 2019 11:41 pm

I think I figured it out and added parentheses after the ! and at the end of the expression. Seems the test for error changed with some upgrade.

Thanks

daveNC
 
Posts: 26
Joined: Thu Nov 09, 2017 2:32 pm

Please be positive and constructive with your questions and comments.