neu-rah / ArduinoMenu

Arduino generic menu/interactivity system
GNU Lesser General Public License v2.1
933 stars 189 forks source link

Combining Events error on PlatformIO #321

Closed HamidSaffari closed 3 years ago

HamidSaffari commented 3 years ago

Hi, in platformIO when I combining two or more Events compiler got error. althogh in Arduino IDE have got no error.

here is the Error: src\code.cpp:396:115: error: invalid conversion from 'int' to 'Menu::eventMask' [-fpermissive] 396 | ,FIELD(TEMP_value,"TEMP","",0,16383,10,1,do_TEMP_OUT, enterEvent | exitEvent | updateEvent,wrapStyle)

neu-rah commented 3 years ago

hi! you can cast the combined to eventMask ie:

(eventMask)(enterEvent | exitEvent | updateEvent)

not compiled this.. but it should be something like that

HamidSaffari commented 3 years ago

Thanks man. It works. , (Menu::eventMask)(enterEvent | updateEvent) ,