PX4 Firmware
PX4 Autopilot Software http://px4.io
TemperatureCalibrationCommon< Dim, PolyfitOrder > Class Template Referenceabstract

class TemperatureCalibrationCommon Common base class for all sensor types, contains shared code & data. More...

#include <common.h>

Inheritance diagram for TemperatureCalibrationCommon< Dim, PolyfitOrder >:
Collaboration diagram for TemperatureCalibrationCommon< Dim, PolyfitOrder >:

Classes

struct  PerSensorData
 

Public Member Functions

 TemperatureCalibrationCommon (float min_temperature_rise, float min_start_temperature, float max_start_temperature)
 
virtual ~TemperatureCalibrationCommon ()=default
 
int update ()
 
- Public Member Functions inherited from TemperatureCalibrationBase
 TemperatureCalibrationBase (float min_temperature_rise, float min_start_temperature, float max_start_temperature)
 
virtual ~TemperatureCalibrationBase ()
 
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

virtual int update_sensor_instance (PerSensorData &data, int sensor_sub)=0
 update a single sensor instance More...
 
- Protected Member Functions inherited from TemperatureCalibrationBase
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

PerSensorData _data [SENSOR_COUNT_MAX]
 
unsigned _num_sensor_instances {0}
 
int _sensor_subs [SENSOR_COUNT_MAX]
 
- Protected Attributes inherited from TemperatureCalibrationBase
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...
 

Detailed Description

template<int Dim, int PolyfitOrder>
class TemperatureCalibrationCommon< Dim, PolyfitOrder >

class TemperatureCalibrationCommon Common base class for all sensor types, contains shared code & data.

Definition at line 120 of file common.h.

Constructor & Destructor Documentation

◆ TemperatureCalibrationCommon()

template<int Dim, int PolyfitOrder>
TemperatureCalibrationCommon< Dim, PolyfitOrder >::TemperatureCalibrationCommon ( float  min_temperature_rise,
float  min_start_temperature,
float  max_start_temperature 
)
inline

Definition at line 123 of file common.h.

◆ ~TemperatureCalibrationCommon()

template<int Dim, int PolyfitOrder>
virtual TemperatureCalibrationCommon< Dim, PolyfitOrder >::~TemperatureCalibrationCommon ( )
virtualdefault

Member Function Documentation

◆ update()

template<int Dim, int PolyfitOrder>
int TemperatureCalibrationCommon< Dim, PolyfitOrder >::update ( )
inlinevirtual
See also
TemperatureCalibrationBase::update()

Implements TemperatureCalibrationBase.

Definition at line 131 of file common.h.

◆ update_sensor_instance()

template<int Dim, int PolyfitOrder>
virtual int TemperatureCalibrationCommon< Dim, PolyfitOrder >::update_sensor_instance ( PerSensorData data,
int  sensor_sub 
)
protectedpure virtual

update a single sensor instance

Returns
0 when done, 1 not finished yet, <0 for an error

Implemented in TemperatureCalibrationBaro, TemperatureCalibrationGyro, and TemperatureCalibrationAccel.

Member Data Documentation

◆ _data

template<int Dim, int PolyfitOrder>
PerSensorData TemperatureCalibrationCommon< Dim, PolyfitOrder >::_data[SENSOR_COUNT_MAX]
protected

Definition at line 185 of file common.h.

◆ _num_sensor_instances

template<int Dim, int PolyfitOrder>
unsigned TemperatureCalibrationCommon< Dim, PolyfitOrder >::_num_sensor_instances {0}
protected

Definition at line 193 of file common.h.

◆ _sensor_subs

template<int Dim, int PolyfitOrder>
int TemperatureCalibrationCommon< Dim, PolyfitOrder >::_sensor_subs[SENSOR_COUNT_MAX]
protected

Definition at line 194 of file common.h.


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