Open Adrianotiger opened 4 years ago
Hi, just want to say that with my new Arduino IDE I got some warnings about constants.
This code:
uint8_t qrcodeBytes[qrcode_getBufferSize(2)];
should create a new array. But since the qrcode_getBufferSize function is not a constant, I get some warnings.
qrcode_getBufferSize
Moving the 2 functions to the header and declaring them with defines, it works like expected:
#define bb_getGridSizeBytes(_size) ((_size * _size + 7) / 8) #define qrcode_getBufferSize(_ver) bb_getGridSizeBytes((4 * _ver + 17))
Hi, just want to say that with my new Arduino IDE I got some warnings about constants.
This code:
should create a new array. But since the
qrcode_getBufferSize
function is not a constant, I get some warnings.Moving the 2 functions to the header and declaring them with defines, it works like expected: