Menu selection


Results 1 to 8 of 8

Thread: Menu selection

Threaded View

  1. #5
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    Hi, the problem is that I need sub menus.


    This is the end of my program which I am trying to create menus and sub_menus

    PORTC.3 is use to switch to the next result, but if PORTC.3 is not press for 10 seconds it returns to the previous condition now shown here. My problem is making the menus and the 10 seconds limit.
    Anyone can help me ???

    K

    Code:
    'Show time battery discharge  times, Here is hte result of a push on PORTC.3
                lcdout $FE,1, "  Appuyé sur Suivant  "
                lcdout $FE,$C0, "Press on next"
                pause 100
                
    if PORTC.3 != 1 then      'show the array time- NEXT button; PORTC.3 is the 'Next' button
        if Battery_Cycle_Discharge_Counter = 0 then
                lcdout $FE,1, " Aucun test "
                lcdout $FE,$C0, "No test"
                pause 1000
        Endif
        
        if Battery_Cycle_Charge_Counter = 0 then
                lcdout $FE,1, " Aucun test "
                lcdout $FE,$C0, "No test"
                pause 1000
        Endif
                
        if Battery_Cycle_Charge_Counter > 0 then ' Only display if there is something in the array. Show the time for 10 seconds, if PORTC.3 is not press then go back to Mainloop
            BCCC = Battery_Cycle_Charge_Counter
            Counter = 0
                While BCCC != 0
                    While PORTC.3 != 1        'Hold the time on LCD until 'NEXT' button is pushed again or max 10 seconds
                        lcdout $FE,1, " Charge time: " dec Counter
                        lcdout $FE,$C0, dec Voltage_Array_Charge_time_RTCDay[Counter]," jour ",dec Voltage_Array_Charge_time_RTCHour[Counter],dec Voltage_Array_Charge_time_RTCMin[Counter],dec Voltage_Array_Charge_time_RTCSec[Counter]
                        pause 1000
                        Gosub Hold_menu_1 'Pause until PORTC.3 != 1  ..or ten seconds
                    Wend
                        BCCC = BCCC - 1
                        Counter = Counter + 1 
                Wend
        Endif
        
        Gosub Hold_menu_2
            
            ' if PORTC.4 != 1 then      'show the array time Previous....to be completed... similar to NEXT menu
    
    
    endif
    
    Return
    
    '/////////////////////////////
    '/////// Hold_Menu_1  ////////
    '/////////////////////////////
    Hold_Menu_1:
    
    for i = 1 to 100
        if PORTC.3 != 1 then 
            goto Here_to_return
        Endif
    pause 100
    next i
    Goto mainloop
    
    Here_to_return
    Return
    
    '/////////////////////////////
    '/////// Hold_Menu_2  ////////
    '/////////////////////////////
    Hold_Menu_2:
    
    for i = 1 to 100
                lcdout $FE,1, " Waiting 10 sec. "
                lcdout $FE,$C0, "Or click next"
                pause 100
                    if PORTC.3 != 1 then goto Mainloop
    next i
    Goto Mainloop
    
    Return
    Last edited by ScaleRobotics; - 24th November 2010 at 15:17. Reason: added code tags

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts