Code Review?


Closed Thread
Results 1 to 5 of 5

Thread: Code Review?

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125


    Did you find this post helpful? Yes | No

    Default

    Thanks much! I will try these out for sure.

    Any input on interrupt processor or timing routine? For some reason once I hit the interrupt to select a menu item, if THAT menu item needs to use the BO button it does not respond..

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    not sure of me but what about if you modify that section
    Code:
    While selectit = 0
       Mnu=1           			' we are in the menu system
       If Mmenu = 0 then 
        	While  Mmenu = 0    ' waiting until
        	wend                ' push-button is release
        	pause 100          	' debounce time
       		Bmenu=Bmenu+1 		' increment each time B0 is presseed
       endif       ' bo pressed – go to next menu
    to
    Code:
    FirstPass=1  
    While selectit = 0
       Mnu=1           			' we are in the menu system
       If Mmenu = 0 then 
        	While  Mmenu = 0    ' waiting until
        	wend                ' push-button is release
        	pause 100          	' debounce time
       		if FirstPass =0 then Bmenu=Bmenu+1 		' increment each time B0 is presseed
       endif       ' bo pressed – go to next menu
       FirstPass=0
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125


    Did you find this post helpful? Yes | No

    Default

    What does the new variable 'firstpass' do? Does it allow me to continue to use the BO and B1 buttons in submenus somehow?

    My biggest problem is that when I interrupt, I go into the menu routine, but then if a SUBMENU routine there needs to use the buttons to choose things -- Like the LCDSettings: menu - they just don't do anything - I press buttons in this SubMenu routine (LCDsetting). This forces me to have a HUGE linear menu system which sucks... - ie 12 menu items vs say 4 top menus, each with 3 choices..

    TG

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 22:55
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 22:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 9th December 2008, 00:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 09:26
  5. A little code review by the Group
    By manwolf in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th June 2008, 02:14

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