commented the plan for the for what the sensor trait methods will do.
This commit is contained in:
+11
-2
@@ -116,13 +116,22 @@ pub trait Driver {
|
||||
/// Some sensors may also provide current and voltage feedback, if implemented the communication system can sync them to the host you for.
|
||||
/// Can also be used for other custom logic. They are unused by RNavP, entirely optional.
|
||||
pub trait Sensor {
|
||||
///Gets a speed struct value from the motors sensor
|
||||
///Returns the speed struct value from the motors sensor
|
||||
/// This should be non-blocking, there should be some form of cached value ready to go as soon as the method is called
|
||||
/// IF properly returned in the correct Enum Data field, all other systems will use the value propely
|
||||
///
|
||||
/// IF properly returned in the correct Enum Data field, all other systems will use the value propely, being unit agnostic later.
|
||||
fn get_speed(&self) -> Speed;
|
||||
|
||||
///Returns the current from the sensor, if it capable.
|
||||
/// This should be non-blocking. Keep a cached value ready.
|
||||
fn get_current(&self) -> Option<Current>;
|
||||
|
||||
///Returns the current voltage from the sensro, if it is capable.
|
||||
/// This should be non-blocking. Keep a cached value ready.
|
||||
fn get_voltage(&self) -> Option<Voltage>;
|
||||
|
||||
///Returns the current angle from the sensor if it is capable.
|
||||
/// This should be non-blocking. Keep a cached value ready.
|
||||
fn get_angle(&self) -> Option<Angle>;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user