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

error: passing 'const SerialMenu' as 'this' argument discards qualifiers [-fpermissive] #2

Open
DanielRIOT opened this issue Jul 30, 2020 · 1 comment

Comments

@DanielRIOT
Copy link

Hi, I'm trying to use this library on a Arduino Zero but getting the following error when trying demo2 :
Arduino IDE ver 1.8.12

seems to affect the load and getNumber methods

demo2.ino: In lambda function:
demo2:39:74: error: passing 'const SerialMenu' as 'this' argument discards qualifiers [-fpermissive]
{"> - Sub-menu", false, '>', { menu.load(subMenu, subMenuSize); menu.show();} }

note: in call to 'void SerialMenu::load(const SerialMenuEntry*, uint8_t)'
inline void load(const SerialMenuEntry* array, uint8_t arraySize)
^~~~

I also had to add "#include <Arduino.h>" to the hpp file or it could not find "Serial"

@chkris001
Copy link

Hello, dou you solve this issue ? I have the same passing with PlatformIO/VSCode. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants