Skyward boardcore
|
#include <AnalogLoadCell.h>
Public Member Functions | |
AnalogLoadCell (std::function< ADCData()> getVoltage, const float mVtoV, const unsigned int fullScale, const float supplyVoltage=5) | |
bool | init () override |
Initialize the sensor. | |
bool | selfTest () override |
Check if the sensor is working. | |
void | setOffset (const float offset) |
Sets the offset that will be removed from the measured load. | |
void | updateOffset (float offset) |
![]() | |
Sensor () | |
Sensor (Sensor &&other) | |
virtual | ~Sensor () |
void | sample () override |
Sample the sensor. | |
virtual AnalogLoadCellData | getLastSample () |
![]() | |
virtual | ~AbstractSensor () |
SensorErrors | getLastError () |
Get last error for debugging purposes. Avoid silent fails. | |
Protected Member Functions | |
AnalogLoadCellData | sampleImpl () override |
Read a data sample from the sensor. In case of errors, the method should return the last available correct sample. | |
Additional Inherited Members | |
![]() | |
using | DataType |
![]() | |
DataType | lastSample |
miosix::FastMutex | mutex |
![]() | |
SensorErrors | lastError = SensorErrors::NO_ERRORS |
Definition at line 34 of file AnalogLoadCell.h.
|
inline |
Definition at line 37 of file AnalogLoadCell.h.
|
inlineoverridevirtual |
Initialize the sensor.
Implements Boardcore::AbstractSensor.
Definition at line 44 of file AnalogLoadCell.h.
|
inlineoverrideprotectedvirtual |
Read a data sample from the sensor. In case of errors, the method should return the last available correct sample.
Implements Boardcore::Sensor< AnalogLoadCellData >.
Definition at line 56 of file AnalogLoadCell.h.
|
inlineoverridevirtual |
Check if the sensor is working.
Implements Boardcore::AbstractSensor.
Definition at line 46 of file AnalogLoadCell.h.
|
inline |
Sets the offset that will be removed from the measured load.
Definition at line 51 of file AnalogLoadCell.h.
|
inline |
Definition at line 53 of file AnalogLoadCell.h.