From main menu i enter submenu1 with an enter button press.The problem is if i hold the button for a while, i enter directly the subsubmenu.
I want when i press the button briefly or hold it to enter only the submenu.When i release the button and make a second press to enter the subsubmenu.
I use a previous button too.
I think i should give to each submenu a unique address and call it when i need it but i don't now how.
Here is my button code for enter and previous buttons.
I use flag_enter_prev_main for the result of enter and previous button presses.
if(input(PIN_C3) && input(PIN_C0))
{
status_enter_prev_main=0;
}
flag_enter_prev_main=!flag_prev_main && flag_enter_main;
//end of enter and previous buttons
dezso
Joined: 04 Mar 2010 Posts: 102
Posted: Tue Mar 13, 2012 9:31 am
Code:
while(!input(PIN_C3) // Loop here until button released.
{
delay_ms(50);
}
Add this after your button check code
if(...... _________________ I'm could be wrong many time's, at least I know what I'm doing
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum