SimpleFOClibrary  2.1
Sensor Class Referenceabstract

#include <Sensor.h>

Inheritance diagram for Sensor:
Encoder HallSensor MagneticSensorAnalog MagneticSensorI2C MagneticSensorSPI

Public Member Functions

virtual float getAngle ()=0
 
virtual float getVelocity ()
 
virtual int needsSearch ()
 

Detailed Description

Sensor abstract class defintion Each sensor needs to have these functions implemented

Definition at line 26 of file Sensor.h.

Member Function Documentation

◆ getAngle()

virtual float Sensor::getAngle ( )
pure virtual

get current angle (rad)

Implemented in Encoder, HallSensor, MagneticSensorSPI, MagneticSensorI2C, and MagneticSensorAnalog.

◆ getVelocity()

float Sensor::getVelocity ( )
virtual

get current angular velocity (rad/s)

Reimplemented in Encoder, HallSensor, MagneticSensorSPI, MagneticSensorI2C, and MagneticSensorAnalog.

Definition at line 15 of file Sensor.cpp.

◆ needsSearch()

int Sensor::needsSearch ( )
virtual

returns 0 if it does need search for absolute zero 0 - magnetic sensor (& encoder with index which is found) 1 - ecoder with index (with index not found yet)

Reimplemented in Encoder.

Definition at line 10 of file Sensor.cpp.


The documentation for this class was generated from the following files: