You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a lot of sensor classes with various issues that would cause even more sensor classes. Due to that, I suggest we put all new sensor classes in a .sensor package and possibly move the remaining old classes there as well.
AnalogPotentiometer is currently a catch-all for scaled/offset analog sensors, and it's confusing. We should extract a base class (templated on units in C++), and have subclasses for common sensors: potentiometers, maybe pressure sensors, and possibly others.
Sim support for all of these will be tricky. I see two options: use the SimDevice API (approach currently used by the Ultrasonic class), or run it through the HALSIM (this will somewhat require duplication of the conversion functionality in the regular classes). Obviously, we'll be doing some sort of combination.
The text was updated successfully, but these errors were encountered:
We have a lot of sensor classes with various issues that would cause even more sensor classes. Due to that, I suggest we put all new sensor classes in a
.sensor
package and possibly move the remaining old classes there as well.Overview of the changes we'll want:
Encoders (Initial attempt at new unit-safe encoder API #3709, Renamed Encoder to QuadratureEncoder #2418, Make encoder classes unit-aware #6746): We want
[Rotary, Linear] X [Quadrature, Analog, DutyCycle]
. Extracting a base class/interface would be good, but due to absolute/relative differences, I'm not sure whether that'll be possible.Ultrasonics (Make more specific classes for kinds of ultrasonic sensors #4894):
AnalogUltrasonic
,PingResponseUltrasonic
.Gyros (3d gyro interface #4936): 3D Gyro interface.
AnalogPotentiometer
is currently a catch-all for scaled/offset analog sensors, and it's confusing. We should extract a base class (templated on units in C++), and have subclasses for common sensors: potentiometers, maybe pressure sensors, and possibly others.Sim support for all of these will be tricky. I see two options: use the SimDevice API (approach currently used by the Ultrasonic class), or run it through the HALSIM (this will somewhat require duplication of the conversion functionality in the regular classes). Obviously, we'll be doing some sort of combination.
The text was updated successfully, but these errors were encountered: