Re: some help with math
Hey Longpole001, you asked this:
and this i cant find a better way to do to reduce its compile size
if val < 6 AND Menu_Select = 211 then
lookup val,[1,2,4,8,16,32],val ' reasign val to
gosub Show_current_sel_2 ' place "* *" on the selected channel in menu using bit pattern sleection
endif
Why not use the PBP command "DCD for the lookup table problem like this:
Value = DCD Value
When you come into the statement value will be a number between 0 and something less than 31, DCD will give it a value based on the bit position which is what you are doing with the lookup command. a value of 0 = 1, a value of 1 = 2, a value of 2 = 4 and so on. At lease that's how I would do it...
Dave Purola,
N8NTA
EN82fn
Bookmarks