Add parenthesis to fix compiler warning
Gcc warns when using = where == seems logical, and adding parenthesis tells gcc you really mean =.
This commit is contained in:
parent
05b145146a
commit
565d9afd36
@ -121,7 +121,7 @@ void loop() {
|
|||||||
|
|
||||||
// this is our 'wait for incoming subscription packets' busy subloop
|
// this is our 'wait for incoming subscription packets' busy subloop
|
||||||
Adafruit_MQTT_Subscribe *subscription;
|
Adafruit_MQTT_Subscribe *subscription;
|
||||||
while (subscription = mqtt.readSubscription(1000)) {
|
while ((subscription = mqtt.readSubscription(1000))) {
|
||||||
if (subscription == &onoffbutton) {
|
if (subscription == &onoffbutton) {
|
||||||
Serial.print(F("Got: "));
|
Serial.print(F("Got: "));
|
||||||
Serial.println((char *)onoffbutton.lastread);
|
Serial.println((char *)onoffbutton.lastread);
|
||||||
|
@ -104,7 +104,7 @@ void loop() {
|
|||||||
|
|
||||||
// this is our 'wait for incoming subscription packets' busy subloop
|
// this is our 'wait for incoming subscription packets' busy subloop
|
||||||
Adafruit_MQTT_Subscribe *subscription;
|
Adafruit_MQTT_Subscribe *subscription;
|
||||||
while (subscription = mqtt.readSubscription(1000)) {
|
while ((subscription = mqtt.readSubscription(1000))) {
|
||||||
if (subscription == &onoffbutton) {
|
if (subscription == &onoffbutton) {
|
||||||
Serial.print(F("Got: "));
|
Serial.print(F("Got: "));
|
||||||
Serial.println((char *)onoffbutton.lastread);
|
Serial.println((char *)onoffbutton.lastread);
|
||||||
|
@ -144,7 +144,7 @@ void loop() {
|
|||||||
|
|
||||||
// this is our 'wait for incoming subscription packets' busy subloop
|
// this is our 'wait for incoming subscription packets' busy subloop
|
||||||
Adafruit_MQTT_Subscribe *subscription;
|
Adafruit_MQTT_Subscribe *subscription;
|
||||||
while (subscription = mqtt.readSubscription(5000)) {
|
while ((subscription = mqtt.readSubscription(5000))) {
|
||||||
if (subscription == &onoffbutton) {
|
if (subscription == &onoffbutton) {
|
||||||
Serial.print(F("Got: "));
|
Serial.print(F("Got: "));
|
||||||
Serial.println((char *)onoffbutton.lastread);
|
Serial.println((char *)onoffbutton.lastread);
|
||||||
|
Loading…
Reference in New Issue
Block a user