Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library does not compile in Arduino IDE #32

Closed
Deja-Github opened this issue May 4, 2023 · 3 comments
Closed

Library does not compile in Arduino IDE #32

Deja-Github opened this issue May 4, 2023 · 3 comments
Assignees
Labels
Grove_LED_Bar Label for Grove_LED_Bar UAY Unassigned yet

Comments

@Deja-Github
Copy link

Deja-Github commented May 4, 2023

I'm getting a compilation error when including this library in the Arduino IDE. I'm pretty new to Arduino and I'm not familiar with CPP, any ideas?

                 from C:\Users\rd\Documents\Arduino\libraries\Grove_LED_Bar\Grove_LED_Bar.cpp:33:
C:\Users\rd\Documents\Arduino\libraries\Grove_LED_Bar\Grove_LED_Bar.cpp: In member function 'void Grove_LED_Bar::setLevel(float)':
C:\Users\rd\Documents\Arduino\libraries\Grove_LED_Bar\Grove_LED_Bar.cpp:97:40: error: expected ')' before numeric constant
   level = max(0.0F, min((MY9221_LED_NUM.0F), level));
                                        ^
C:\Users\rd\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:93:24: note: in definition of macro 'max'
 #define max(a,b) ((a)>(b)?(a):(b))
                        ^
C:\Users\rd\Documents\Arduino\libraries\Grove_LED_Bar\Grove_LED_Bar.cpp:97:21: note: in expansion of macro 'min'
   level = max(0.0F, min((MY9221_LED_NUM.0F), level));
                     ^~~
C:\Users\rd\Documents\Arduino\libraries\Grove_LED_Bar\Grove_LED_Bar.cpp:97:53: error: expected ')' before ';' token
   level = max(0.0F, min((MY9221_LED_NUM.0F), level));
                                                     ^
C:\Users\rd\Documents\Arduino\libraries\Grove_LED_Bar\Grove_LED_Bar.cpp:97:53: error: expected ')' before ';' token
C:\Users\rd\Documents\Arduino\libraries\Grove_LED_Bar\Grove_LED_Bar.cpp:97:53: error: expected ')' before ';' token
C:\Users\rd\Documents\Arduino\libraries\Grove_LED_Bar\Grove_LED_Bar.cpp:97:53: error: expected ')' before ';' token

exit status 1

Compilation error: exit status 1```
@Deja-Github
Copy link
Author

update: I have tried compiling v1.0.1 of the lib with both Arduino IDE v1.8.19 and v2.1.0 and it consistently fails, however I just tried v1.0.0 of the library and that compiles ok.

@MatthewJeffson MatthewJeffson added UAY Unassigned yet Grove_LED_Bar Label for Grove_LED_Bar labels Oct 9, 2024
@Lesords Lesords assigned Lesords and ackPeng and unassigned Lesords Oct 14, 2024
@ackPeng
Copy link

ackPeng commented Oct 16, 2024

@Deja-Github Thank you very much for your question. We have updated this library. The reason for this problem is incorrect data type conversion. This problem should not occur now.

@Lesords
Copy link

Lesords commented Oct 30, 2024

Hello,

I'm going to close this issue, feel free to re-open it if you have any other questions.

[Autocommentary]

@Lesords Lesords closed this as completed Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Grove_LED_Bar Label for Grove_LED_Bar UAY Unassigned yet
Projects
Status: Done
Development

No branches or pull requests

4 participants