/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Documentation on Menu Usage

Username:     
Password:     
             

Forum

# 1   2013-03-19 06:28:52 Documentation on Menu Usage

softy
Member
Registered: 2012-12-03
Posts: 68

Documentation on Menu Usage

HI,
Is there any documentation on the MENU usage fro the Circle OS  application.I am not able to get how can I make the Menu Persists, Leave,and go back to the running activity and then how can I call back the Menu again.

I am doing something like this :

Application_Ini()
{

//setting the MENU
MENU_Set( &My_Menu ); 
//do Initialaizations

return  MENU_LEAVE;

}


Inside Application_Handler()
{


//displaying data  on the LCD



return MENU_CONTINUE;

}


My task is to make the Menu Options(like this) >
                                           ____Option 1
                                                        ____Option 11
                                                        ____Option 12
                                                        ____Option 13


                                           ____Option 2
                                                        ____Option 21
                                                        ____Option 22
                                                        ____Option 23


                                           ____Option 3
                                                        ____Option 31
                                                        ____Option 32
                                                        ____Option 33



                     
User goes to Option1>Option11(similairly for all options) and once he is done with settigns required options he come back to teh activity where the data displaying keeps running.
I need some demo example or the Documentation for Menu_(status).
PLz asssit me on this.
Rgds,
Softy

Last edited by softy (2013-03-19 06:59:30)


" Pain is temporary, Quitting Lasts for ever"

Offline

 

# 2   2013-03-19 07:14:44 Documentation on Menu Usage

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Documentation on Menu Usage

Take a look at the Coception Document of the CircleOS that you will find in the resources page.

Offline

 

# 3   2013-03-19 11:46:22 Documentation on Menu Usage

softy
Member
Registered: 2012-12-03
Posts: 68

Re: Documentation on Menu Usage

Thanks for the comment , but I still cant find my Answer.
I wanted to pass the control to my application_handler once i invoke a menu list which I am doing within the application_handler.The back button or the Quit of this menu list must not terminate the application (which is happening now) , rather on pressing Quit it must go back to the Application_handler which was executing.
Does the application handler gets invoked after every 1 ms.Am I invalidating this condition (disabling timer 2 interrupt -TIM_Cmd( TIM2, DISABLE) by invoking the Menu  MENU_Set( &New_Menu );  from within the application_handler.Any comments !!
Once I do the back I get a white screen with a Dot floating.
Rgds,
softy

Last edited by softy (2013-03-19 11:55:45)


" Pain is temporary, Quitting Lasts for ever"

Offline

 

# 4   2013-03-26 07:15:40 Documentation on Menu Usage

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Documentation on Menu Usage

Your application handler is invoked periodically by the menu handler (depending on the Application divider), called by the scheduler, triggered by the systick (~ 1 ms).
The TIM2 interrupt is only useful for the MEMS management.

For implement a menu within your application :
    MENU_Set( ( tMenu* ) &MyMenu );
    return MENU_CHANGE;

For return to the application from the menu:
    return MENU_RESTORE_COMMAND;    // Restore application handler

For return to a menu from a submenu:
    return MENU_CONTINUE_COMMAND;

For quit application:
    MENU_ClearCurrentCommand();
    return MENU_Quit();

You can take a look at the "STM32L weather project" (http://www.stm32circle.com/projects/project.php?id=214, which implements 2 levels of menu within the application.

Some precisions about your first post :
- the application ini is called only one time by the menu handler, and must return MENU_CONTINUE_COMMAND; in order the menu handler pass the hand to the application handler. If you return MENU_LEAVE you lost the hand.
- the ini should be reserved for variable initialization or background screen display.
- the management of menu must be done in the application handler, as implemented in the example project I talked you about.

Last edited by yrt (2013-03-26 08:02:15)

Offline

 

Board footer