Open goephs opened 10 months ago
This is the header definition:
Ah, this may be a bug. I don't know that I have a device that would really test that last else case (not AVR and not ESP). Here are some suggestions to try:
\
to push the definition to the next line. That may not be supported. Try moving the contents of line 34 to line 33 (remove the \
).If either of these work, we can update the project to fix that.
Hello Jason,
//#else//#define pgm_read_byte(addr) \// ((const unsigned char )(addr)) // workaround for non-AVR
The compiler is unhappy with the expansion:
tm1637tinydisplay.cpp:29: In file included from tm1637tinydisplay.h: 33:32: error: expected unqualified-id before 'const 33 | #define pgm_read_byte(addr) ((const unsigned char )(addr)) \ workaround for non-AVR | ^~~pgmspace.h:116: note in expansion of macro pgm_read_byte 116 | static inline unsigned char pgm_read_byte(const void *addr) { | ^~~ tm1637tinydisplay.h: 33:32: error: expected ')' before 'const 33 | #define pgm_read_byte(addr) ((const unsigned char )(addr)) \ workaround for non-AVR | ~^~~pgmspace.h:116: note in expansion of macro pgm_read_byte 116 | static inline unsigned char pgm_read_byte(const void *addr) { | ^~
In a few days, I'll test with a tm1637 display on the pico and let you know. My functionality needs are only to display integers and float numbers. Occasionally a degree sign (little o shifted up). Kind regards,Gavin Watson (goephs)
On Thursday, November 30, 2023 at 10:48:32 PM EST, Jason Cox ***@***.***> wrote:
This is the header definition:
Ah, this may be a bug. I don't know that I have a device that would really test that last else case (not AVR and not ESP). Here are some suggestions to try:
If either of these work, we can update the project to fix that.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Thanks @goephs ! I suspect you just needed to remove that #else
condition. The formatting in your email didn't come through very well but I think I get the gist.
Let us know if it work on the device.
Hello Jason,I tested the tm1637 display on the PICO with the #else condition removed and it worked perfectly with both your demo script and test script. I'm good to go now. Thank you for your help!
On Friday, December 1, 2023 at 10:42:03 PM EST, Jason Cox ***@***.***> wrote:
Thanks @goephs ! I suspect you just needed to remove that #else condition. The formatting in your email didn't come through very well but I think I get the gist.
Let us know if it work on the device.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Thanks @goephs !
tm1637tinydisplay.cpp:29: In file included from tm1637tinydisplay.h: 34:6: error: expected unqualified-id before 'const 34 | ((const unsigned char )(addr)) \ workaround for non-AVR | ^~~~~ pgmspace.h:116: note in expansion of macro pgm_read_byte 116 | static inline unsigned char pgm_read_byte(const void *addr) { | ^
~~~~