Skip to content

Redefine warnings on verify and upload (which still finishes) #3

@FokkeZB

Description

@FokkeZB

When I use the current release in the old repo or this - after #2 - up to date moved version I get the following error when verifying or uploading an example:

/var/folders/cv/b296rfgs7t7bqsl6r03mg_4h0000gn/T/arduino_modified_sketch_365412/Downlink.ino:10:0: warning: "debugPrintLn" redefined
 #define debugPrintLn(...) { if (debugSerial) debugSerial.println(__VA_ARGS__); }
 ^
In file included from /var/folders/cv/b296rfgs7t7bqsl6r03mg_4h0000gn/T/arduino_modified_sketch_365412/Downlink.ino:1:0:
/Users/fokkezb/Documents/Arduino/libraries/TheThingsNetwork/src/TheThingsNetwork.h:23:0: note: this is the location of the previous definition
 #define debugPrintLn(...) { if (debugStream) debugStream->println(__VA_ARGS__); }
 ^
/var/folders/cv/b296rfgs7t7bqsl6r03mg_4h0000gn/T/arduino_modified_sketch_365412/Downlink.ino:11:0: warning: "debugPrint" redefined
 #define debugPrint(...) { if (debugSerial) debugSerial.print(__VA_ARGS__); }
 ^
In file included from /var/folders/cv/b296rfgs7t7bqsl6r03mg_4h0000gn/T/arduino_modified_sketch_365412/Downlink.ino:1:0:
/Users/fokkezb/Documents/Arduino/libraries/TheThingsNetwork/src/TheThingsNetwork.h:24:0: note: this is the location of the previous definition
 #define debugPrint(...) { if (debugStream) debugStream->print(__VA_ARGS__); }
 ^

But when I remove the definitions from the example it fails with:

Arduino: 1.6.10 (Mac OS X), Board:"Arduino Leonardo"

In file included from /var/folders/cv/b296rfgs7t7bqsl6r03mg_4h0000gn/T/arduino_modified_sketch_641601/Downlink.ino:1:0:
/var/folders/cv/b296rfgs7t7bqsl6r03mg_4h0000gn/T/arduino_modified_sketch_641601/Downlink.ino: In function 'void setup()':
/Users/fokkezb/Documents/Arduino/libraries/TheThingsNetwork/src/TheThingsNetwork.h:23:33: error: 'debugStream' was not declared in this scope
 #define debugPrintLn(...) { if (debugStream) debugStream->println(__VA_ARGS__); }
                                 ^
/var/folders/cv/b296rfgs7t7bqsl6r03mg_4h0000gn/T/arduino_modified_sketch_641601/Downlink.ino:26:3: note: in expansion of macro 'debugPrintLn'
   debugPrintLn("Setup for The Things Network complete");
   ^
/var/folders/cv/b296rfgs7t7bqsl6r03mg_4h0000gn/T/arduino_modified_sketch_641601/Downlink.ino: In function 'void loop()':
/Users/fokkezb/Documents/Arduino/libraries/TheThingsNetwork/src/TheThingsNetwork.h:23:33: error: 'debugStream' was not declared in this scope
 #define debugPrintLn(...) { if (debugStream) debugStream->println(__VA_ARGS__); }
                                 ^
/var/folders/cv/b296rfgs7t7bqsl6r03mg_4h0000gn/T/arduino_modified_sketch_641601/Downlink.ino:38:5: note: in expansion of macro 'debugPrintLn'
     debugPrintLn("Received " + String(downlinkBytes) + " bytes")
     ^
/Users/fokkezb/Documents/Arduino/libraries/TheThingsNetwork/src/TheThingsNetwork.h:24:31: error: 'debugStream' was not declared in this scope
 #define debugPrint(...) { if (debugStream) debugStream->print(__VA_ARGS__); }
                               ^
/var/folders/cv/b296rfgs7t7bqsl6r03mg_4h0000gn/T/arduino_modified_sketch_641601/Downlink.ino:41:7: note: in expansion of macro 'debugPrint'
       debugPrint(String(ttn.downlink[i]) + " ");
       ^
/Users/fokkezb/Documents/Arduino/libraries/TheThingsNetwork/src/TheThingsNetwork.h:23:33: error: 'debugStream' was not declared in this scope
 #define debugPrintLn(...) { if (debugStream) debugStream->println(__VA_ARGS__); }
                                 ^
/var/folders/cv/b296rfgs7t7bqsl6r03mg_4h0000gn/T/arduino_modified_sketch_641601/Downlink.ino:43:5: note: in expansion of macro 'debugPrintLn'
     debugPrintLn();
     ^
exit status 1

@johanstokking any idea?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions