Wyatt
1.0.1
|
#include <EncoderSensor.h>
Public Member Functions | |
EncoderSensor () | |
~EncoderSensor () | |
void | updateSensor (IMessage *message) |
double | getRPM () |
Public Member Functions inherited from ISensor | |
virtual | ~ISensor () |
Model class used to encapsulate the current speed of the motor as determined by the encoder TODO: change data from RPM to velocity in cm/s to decouple program from hardware
Definition at line 17 of file EncoderSensor.h.
EncoderSensor::EncoderSensor | ( | ) |
Constructor.
Definition at line 7 of file EncoderSensor.cpp.
EncoderSensor::~EncoderSensor | ( | ) |
Destructor.
Definition at line 11 of file EncoderSensor.cpp.
double EncoderSensor::getRPM | ( | ) |
|
virtual |
Updates this object with the newest measurements from an encoder. Measurements may need to be scaled by a gear ratio.
message | IMessage (EncoderMessage) encapsulating the newest measurements. |
MismatchedMessageException | if the type of the message is not EncoderMessage |
Implements ISensor.
Definition at line 15 of file EncoderSensor.cpp.