/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / returning with MENU_LEAVE on CircleOS v3.4

Username:     
Password:     
             

Forum

# 1   2009-06-23 16:13:34 returning with MENU_LEAVE on CircleOS v3.4

adal
Member
Registered: 2009-04-22
Posts: 32

returning with MENU_LEAVE on CircleOS v3.4

Hello,

I'm implementing an application sitting on CircleOS3.4 and I'm struggling get the contol back to the Application_Handler after leaving a menu.
Watch my settings below:

1)The menu code is very easy:

//Menu Functions
enum MENU_code Node_Info_Init(void)
{
  return MENU_CONTINUE_COMMAND;
}

enum MENU_code Node_Info_Action(void)
{
   LCD_DisplayChar (10 , 10, (u8)'?' , RGB_PURPLE, 65535, 1);
   return MENU_LEAVE;
}

2)I initialize the menu structures in Application_Ini:

    /*Menu constants initialization*/
    inputOptions.fdispTitle = 1;
    inputOptions.Title = 0;
    inputOptions.NbItems = 2;
    inputOptions.XPos = 10;
    inputOptions.YPos = 10;
    inputOptions.XSize = 0;
    inputOptions.YSize = 0;
    inputOptions.Items[0].Text = "node info";
    inputOptions.Items[0].Fct_Init =   Node_Info_Init;
    inputOptions.Items[0].Fct_Manage = Node_Info_Action;
    inputOptions.Items[0].fRemoveMenu = 1;
    inputOptions.Items[1].Text = "keys";
    inputOptions.Items[1].Fct_Init =   0;
    inputOptions.Items[1].Fct_Manage = 0;
    inputOptions.Items[1].fRemoveMenu = 1;

3)In the Application_Handler I use the following lines to run the menu :

if (( BUTTON_GetState() == BUTTON_PUSHED ))
      {
        BUTTON_WaitForRelease();
     
        MENU_Set(&inputOptions);     
       }

---
At the end of the menu operation (Node_Info_Action) looks like if the control is not returning to the the Application_Handler, in fact a second button push is not restarting
the Node_Info_Action menu but the scheduler's main menu.
The deadlines are getting tight and I'm saying my prayers hoping that Circle3.4 has full support for menus (since we already have a blocking issue for USART2 on Circle3.7 and
cannot use the latest).

Regards,
Adalberto

Offline

 

# 2   2009-06-24 07:59:37 returning with MENU_LEAVE on CircleOS v3.4

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

Re: returning with MENU_LEAVE on CircleOS v3.4

Hi Adalberto,

We have facilitated the possibility for application to manage popup menu, in CircleOS version 3.7. For example the RecWav application use a list (through a menu) to choose the file to delete.

We know you got some problem with UART2 and v3.7, and we are sorry, but we don't see why there would be some difference between the two versions for this peripheral.

Anyway, you can take a look to applications like "Graphics", "Chess"... that manage menus, with old version of CircleOS.

Regards,
Yves.

Offline

 

# 3   2009-06-24 09:43:59 returning with MENU_LEAVE on CircleOS v3.4

adal
Member
Registered: 2009-04-22
Posts: 32

Re: returning with MENU_LEAVE on CircleOS v3.4

Ok,

Given that 3.4 doesn't contain application level menu handlers I think I wil temporarily  write my own code to handle basic menus, rather than picking from existing apps(I've seen chess), just to release my little demo a.s.a.p. ;

Thanks,
Adalberto

Offline

 

# 4   2009-06-26 15:06:38 returning with MENU_LEAVE on CircleOS v3.4

adal
Member
Registered: 2009-04-22
Posts: 32

Re: returning with MENU_LEAVE on CircleOS v3.4

yrt,

I finally got my application running on Circle3.7 but I still have the same problem.
Do you have any suggestion at this point?

Adalberto

Offline

 

Board footer