[Logo] TCC discussion forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 


This forum is read only and new users cannot register, please ask all new questions either using GitHub discussions, or in Arduino forum tagging @davetcc.

menuMgr.initForUpDownOk parameter definition vs GUI generated code RSS feed
Forum Index » tcMenu Arduinio library
Author Message
Mr.Robot


Joined: Sep 3, 2021
Messages: 8
Offline
Hey,

I got a new prototype of my hardware in and had to adjust the GPIO numbers for my buttons on my old project. After I recompiled it, something odd happened. The UP and DOWN buttons were switched. First I checked my wiring (since it is a new PCB and could have a design error) but everything seemed ok. After going through the code and API I stumbeled onto an issue with the initForUpDownOk parameters. Even though it is called UP_DOWN_OK, it takes its parameters as DOWN_UP_OK. The GUI, however, generates code in the fashion of UP_DOWN_OK which resulted in my buttons being swapped.

Here is a screenshoot from the designer:

image

and the generated code:

menuMgr.initForUpDownOk(&renderer, &menuArsenal, UP_BUTTON_GPIO, DOWN_BUTTON_GPIO, A_BUTTON_GPIO);

(the GPIO definitions are in a separate config file)

The API for initForUpDownOk however states that DOWN comes before UP:
void MenuManager::initForUpDownOk	(	MenuRenderer * 	renderer,
     MenuItem * 	root,
     pinid_t 	downPin,
     pinid_t 	upPin,
     pinid_t 	okPin 
)


Is this a bug or am I doing something wrong?
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
We'll need to take a look at this and feed back here.
 
Forum Index » tcMenu Arduinio library
Go to:   
Mobile view
Powered by JForum 2.7.0 © 2020 JForum Team • Maintained by Andowson Chang and Ulf Dittmer

This site uses cookies to analyse traffic, serve ads by Google AdSense (non-personalized in EEA/UK), and to record consent. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Our privacy policy applies to all pages on our site

Should you need further guidance on how to proceed: External link for information about cookie management.