Acetronics2
- 15th June 2007, 16:18
Hi, All
I was quietly ( LOL ) debugging Malc's Train controller and ... fell upon a little PbP BUG ... Yes,yes I did verify many times !!!
Which is this ( small ) BUG ???
I've used LOOKUP tables to correct a pot curve ( Log to Lin ... I must be crazy !!! )
So, I used a 8 Bits ADCIN ... and a Lookup table !!!
Calculated and Placed my ... 256 Values ( 0 -255 ...) into my lookup table ( I Know, ... manual whispers 255 !!! ) but no warning or errors when 256 values entered ... only when 257 !!!
What happens ??? Program just crashes ...
Solution ... use " ADC_RESULT MIN 254" before LOOKUP !!!
By the Time, I Also discovered ADCIN does not accept VAR Aliases ... only CON ones. Always had used ADCIN 0,1 or ...
Hope it will help someone not to lose too much hair...
Alain
PS: Malc !!! , Good news !!! Works more than Fine ...
I was quietly ( LOL ) debugging Malc's Train controller and ... fell upon a little PbP BUG ... Yes,yes I did verify many times !!!
Which is this ( small ) BUG ???
I've used LOOKUP tables to correct a pot curve ( Log to Lin ... I must be crazy !!! )
So, I used a 8 Bits ADCIN ... and a Lookup table !!!
Calculated and Placed my ... 256 Values ( 0 -255 ...) into my lookup table ( I Know, ... manual whispers 255 !!! ) but no warning or errors when 256 values entered ... only when 257 !!!
What happens ??? Program just crashes ...
Solution ... use " ADC_RESULT MIN 254" before LOOKUP !!!
By the Time, I Also discovered ADCIN does not accept VAR Aliases ... only CON ones. Always had used ADCIN 0,1 or ...
Hope it will help someone not to lose too much hair...
Alain
PS: Malc !!! , Good news !!! Works more than Fine ...