Closed Krishna-13-cyber closed 1 year ago
Overall I feel this change won't be useful at all. As you are finding max min when the bot is not running. The max min might change as the bot goes ahead.
We tried this on a live bot and discovered that when calibrated, there is a minor shift in the threshold, resulting in improved performance. Additionally, this API gives the user the option to calibrate. They are free to utilise it or not.
I think the improvement is just a placebo effect? But okay. Also, practically, this can cause quite many new bugs, say a bright flash during calibration causes the max value to be 4096, this will be difficult to debug as well.
Closing this for now.
This PR adds the calibration for line sensor readings during the initial phase of the run.The calibrated readings gives us the black and white margins when the bot is placed on the maze/flex rather than passing hard-coded margins for different factors.This method helps in increasing precision for getting the accurate lsa readings when lighting conditions and mazes are varied.