virtualdave
Well-known member
Not a bug, just a "what the...?" ...and really just curious if anyone else had seen anything like this.
So I have a sketch that I've been essentially editing for several months. Suddenly tonight I noticed something wasn't triggering that should have (and has since the first version of the sketch), so printed out the current values and am now scratching my head. Here's the low-down:
I have 2 variables, pressureRingMin & pressureRingMax. Both unsigned longs and hold calibration values for one of the analog inputs. By default these are set to 8500 & 16000, respectively. However when I noticed things weren't working right, the values that were reported were 808333360 875771952, respectively. Again, up till tonight these values would have been reported correctly. If I go through the calibration sequences (resetting the min & max values), everything works fine and new (and correct) min/max values are recorded correctly. Having had variable naming issues in the past with simpler variable names (conflicts with other libraries, I suppose), I did a global change from pressureRingMin to pressureRingMn & pressureRingMax to pressureRingMx, and voila...I'm back in business. But why, I have no idea. I don't think it's the "Min" and "Max" suffixes since those show up in many other variables (e.g. pressurePointerMin, pressurePointerMax). I should be happy that I at least have a solution, but it drives me a bit nuts, and my programming OCD isn't happy that some of my variables end in "Min" and one in "Mn"
Anyway...was curious if anyone else had come across something like this in their Arduino past.
Thanks for reading!
David
So I have a sketch that I've been essentially editing for several months. Suddenly tonight I noticed something wasn't triggering that should have (and has since the first version of the sketch), so printed out the current values and am now scratching my head. Here's the low-down:
I have 2 variables, pressureRingMin & pressureRingMax. Both unsigned longs and hold calibration values for one of the analog inputs. By default these are set to 8500 & 16000, respectively. However when I noticed things weren't working right, the values that were reported were 808333360 875771952, respectively. Again, up till tonight these values would have been reported correctly. If I go through the calibration sequences (resetting the min & max values), everything works fine and new (and correct) min/max values are recorded correctly. Having had variable naming issues in the past with simpler variable names (conflicts with other libraries, I suppose), I did a global change from pressureRingMin to pressureRingMn & pressureRingMax to pressureRingMx, and voila...I'm back in business. But why, I have no idea. I don't think it's the "Min" and "Max" suffixes since those show up in many other variables (e.g. pressurePointerMin, pressurePointerMax). I should be happy that I at least have a solution, but it drives me a bit nuts, and my programming OCD isn't happy that some of my variables end in "Min" and one in "Mn"
Anyway...was curious if anyone else had come across something like this in their Arduino past.
Thanks for reading!
David
Last edited: