You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GetXLR8Version example program fails to compile on my Arch Linux system. I'm using Arduino IDE version 1.8.19, installed from the official Arch repo (the community/arduino package, specifically), and I've followed the quickstart guide (installing board support and the XLR8Info library). Upon compiling, I get a stream of errors in the output log, ending with the usual Error compiling for board XLR8.
Specifically, there are lots of narrowing conversion errors (from ints or unsigned ints to chars), all stemming from the const static char cidTable[] PROGMEM definition on lines 152-160 of src/XLR8Info.cpp. Finally, there's a warning about the left shift operation on line 163 as well, because the compiler thinks the char data type isn't big enough for a 16-bit shift.
I do have some experience with C/C++, and I have to say, these warnings make sense. The typical one-byte char is not large enough to store the values listed in that array. Then again, I would think an issue this obvious would have been caught before deployment, so I feel like I probably have something configured incorrectly. I'm happy to provide further information and test things out for troubleshooting!
The text was updated successfully, but these errors were encountered:
As I expected, I've been able to fix the initial stream of narrowing conversion errors by manually modifying XLR8Info.cpp to use an array of unsigned ints instead of chars, though this leaves the bit-shift warning. Of course, changing this to an even larger data type (unsigned long) takes care of that warning as well.
The GetXLR8Version example program fails to compile on my Arch Linux system. I'm using Arduino IDE version 1.8.19, installed from the official Arch repo (the
community/arduino
package, specifically), and I've followed the quickstart guide (installing board support and the XLR8Info library). Upon compiling, I get a stream of errors in the output log, ending with the usualError compiling for board XLR8
.Specifically, there are lots of narrowing conversion errors (from ints or unsigned ints to chars), all stemming from the
const static char cidTable[] PROGMEM
definition on lines 152-160 ofsrc/XLR8Info.cpp
. Finally, there's a warning about the left shift operation on line 163 as well, because the compiler thinks the char data type isn't big enough for a 16-bit shift.I do have some experience with C/C++, and I have to say, these warnings make sense. The typical one-byte
char
is not large enough to store the values listed in that array. Then again, I would think an issue this obvious would have been caught before deployment, so I feel like I probably have something configured incorrectly. I'm happy to provide further information and test things out for troubleshooting!The text was updated successfully, but these errors were encountered: