allwpilib
allwpilib copied to clipboard
Add support for Sharp IR sensors
- Fixes #6001
/format
/format
Failing the documentation build due to some parameters not being documented.
/format
The test failure doesn't look like something I did.
Happy to add more sensors (GP2Y0A51SK0F and GP2Y0A60SZLF) but I don't have constants for them and the datasheet only has a graph.
This has a similar equation but different numbers: https://github.com/guillaume-rico/SharpIR/blob/master/SharpIR.cpp#L105
- GP2Y0A21YK0F:
29.988 * v ^ -1.173 - GP2Y0A02YK0F:
60.374 * v ^ -1.16or their older formula is61.573 * v ^ -1.1068 - GP2Y0A41SK0F:
12.08 * v ^ -1.058 - GP2Y0A51SK0F:
5.2819 * v ^ -1.161
/format