Open Jorgeruiz97 opened 4 years ago
It appears the issue is both Firmata and WiFiNINA are defining SET_PIN_MODE
, but as different types.
@zfields do you know how to resolve this? Firmata defines SET_PIN_MODE
as a constant but WiFiNINA also defines it as an enum.
I'm looking into it. Let me see if I can come up with something.
FWIW, the issue here appears to be in WiFiNINA, not Firmata. That enum should be restricted in scope.
In all fairness, it takes two to clash, and we are also defining it in the global scope. :smile:
If I recall correctly, we only left SET_PIN_MODE
in the global scope for the sake of backward compatibility, and there are no longer any dependencies in Firmata. Furthermore, it is not needed for any new programs written using Firmata, because Firmata::SET_PIN_MODE
can be used in it's place.
To move forward, I think you can safely comment out lines 64, 65, 66 and 67 in the file /Users/jorgesmacbookpro/Documents/Arduino/libraries/Firmata/FirmataDefines.h
.
@jorgeruiz97 Please try it out, and let us (and the open-source world) know if it worked for you.
Cheers!
That compiles but I think SET_PIN_MODE
holds the value declared in WiFiNINA rather than in FirmataConstants, since the firmata namespace is not declared in any of the example files. Adding the firmata namespace brings up some other issues, but they're resolvable.
Yes, that would be my expectation. The bug here, is that the samples are not using namespace firmata;
.
I can take some time over this coming week, and clean up the samples to use the using
keyword or the namespaced constants where applicable.
Thank you guys! I will try it out during the week and will let you know.
Version
Firmata: latest from master Arduino IDE: Arduino: 1.8.14 Hourly Build 2020/09/23 10:35 (Mac OS X) Board: "Arduino MKR WiFi 1010" OS version: macOS Big Sur 11.0.1
What am I trying to achieve?
I'm trying to compile the StandardFirmataWiFi.ino
Issue
When trying to compile the StandardFirmataWiFi.ino I'm getting the following errors. The StandardFirmata.ino example works and compiles fine.