Package lib.custom.sensors
Class CANSensor
java.lang.Object
lib.custom.CustomCAN
lib.custom.sensors.CANSensor
- Direct Known Subclasses:
CANEncoder,CANInfraredDistanceSensor,CANUltrasonicDistanceSensor
A sensor over CAN
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class lib.custom.CustomCAN
getName, read, readBuffer, readSafely, write, writeSafely
-
Constructor Details
-
CANSensor
- Parameters:
name- Name of CAN sensor (not really needed)id- ID of CAN sensor (0x600 to 0x700, must correspond to a Teensy or similar)
-
-
Method Details
-
getSensorStatuses
-
readSensor
Read the pair of ints from a CAN sensor- Returns:
- The latest pair of integers from the sensor
- Throws:
InvalidSensorException- If the available data is more than one tenth of a second old, this function will throw an InvalidSensorException to indicate that.
-