PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Base class for temperature calibration types with abstract methods (for all different sensor types) More...
#include <common.h>
Public Member Functions | |
TemperatureCalibrationBase (float min_temperature_rise, float min_start_temperature, float max_start_temperature) | |
virtual | ~TemperatureCalibrationBase () |
virtual int | update ()=0 |
check & update new sensor data. More... | |
virtual int | finish ()=0 |
do final fitting & write the parameters. More... | |
virtual void | reset_calibration ()=0 |
reset all driver-level calibration parameters More... | |
Protected Member Functions | |
int | set_parameter (const char *format_str, unsigned index, const void *value) |
set a system parameter (without system notification) and print an error if it fails More... | |
Protected Attributes | |
float | _min_temperature_rise |
minimum difference in temperature before the process finishes More... | |
float | _min_start_temperature |
minimum temperature before the process starts More... | |
float | _max_start_temperature |
maximum temperature above which the process does not start and an error is declared More... | |
Base class for temperature calibration types with abstract methods (for all different sensor types)
|
inline |
|
inlinevirtual |
Definition at line 65 of file common.h.
References finish(), reset_calibration(), set_parameter(), and update().
|
pure virtual |
do final fitting & write the parameters.
Call this exactly once after update() returned 110
Implemented in TemperatureCalibrationBaro, TemperatureCalibrationGyro, and TemperatureCalibrationAccel.
Referenced by TemperatureCalibration::task_main(), and ~TemperatureCalibrationBase().
|
pure virtual |
reset all driver-level calibration parameters
Implemented in TemperatureCalibrationBaro, TemperatureCalibrationGyro, and TemperatureCalibrationAccel.
Referenced by TemperatureCalibration::task_main(), and ~TemperatureCalibrationBase().
|
inlineprotected |
set a system parameter (without system notification) and print an error if it fails
format_str | for example "CAL_GYRO%u_XOFF" |
index | which index (will replace u in format_str) |
value |
Definition at line 102 of file common.h.
References param_find(), and param_set_no_notification().
Referenced by TemperatureCalibrationAccel::finish_sensor_instance(), TemperatureCalibrationGyro::finish_sensor_instance(), TemperatureCalibrationBaro::finish_sensor_instance(), TemperatureCalibrationAccel::reset_calibration(), TemperatureCalibrationGyro::reset_calibration(), and ~TemperatureCalibrationBase().
|
pure virtual |
check & update new sensor data.
Implemented in TemperatureCalibrationCommon< Dim, PolyfitOrder >, TemperatureCalibrationCommon< 1, POLYFIT_ORDER >, and TemperatureCalibrationCommon< 3, 3 >.
Referenced by TemperatureCalibration::task_main(), and ~TemperatureCalibrationBase().
|
protected |
maximum temperature above which the process does not start and an error is declared
Definition at line 97 of file common.h.
Referenced by TemperatureCalibrationAccel::update_sensor_instance(), TemperatureCalibrationGyro::update_sensor_instance(), and TemperatureCalibrationBaro::update_sensor_instance().
|
protected |
minimum temperature before the process starts
Definition at line 96 of file common.h.
Referenced by TemperatureCalibrationAccel::update_sensor_instance(), TemperatureCalibrationGyro::update_sensor_instance(), and TemperatureCalibrationBaro::update_sensor_instance().
|
protected |
minimum difference in temperature before the process finishes
Definition at line 95 of file common.h.
Referenced by TemperatureCalibrationCommon< 3, 3 >::update(), TemperatureCalibrationAccel::update_sensor_instance(), TemperatureCalibrationGyro::update_sensor_instance(), and TemperatureCalibrationBaro::update_sensor_instance().