PX4 Firmware
PX4 Autopilot Software http://px4.io
TemperatureCalibrationBaro Class Reference

#include <baro.h>

Inheritance diagram for TemperatureCalibrationBaro:
Collaboration diagram for TemperatureCalibrationBaro:

Public Member Functions

 TemperatureCalibrationBaro (float min_temperature_rise, float min_start_temperature, float max_start_temperature)
 
virtual ~TemperatureCalibrationBaro ()
 
int finish ()
 
void reset_calibration ()
 
- Public Member Functions inherited from TemperatureCalibrationCommon< 1, POLYFIT_ORDER >
 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 ()
 

Private Member Functions

virtual int update_sensor_instance (PerSensorData &data, int sensor_sub)
 update a single sensor instance More...
 
int finish_sensor_instance (PerSensorData &data, int sensor_index)
 

Additional Inherited Members

- 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 inherited from TemperatureCalibrationCommon< 1, POLYFIT_ORDER >
PerSensorData _data [SENSOR_COUNT_MAX]
 
unsigned _num_sensor_instances
 
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

Definition at line 42 of file baro.h.

Constructor & Destructor Documentation

◆ TemperatureCalibrationBaro()

TemperatureCalibrationBaro::TemperatureCalibrationBaro ( float  min_temperature_rise,
float  min_start_temperature,
float  max_start_temperature 
)

Definition at line 48 of file baro.cpp.

References TemperatureCalibrationCommon< 1, POLYFIT_ORDER >::_num_sensor_instances, TemperatureCalibrationCommon< 1, POLYFIT_ORDER >::_sensor_subs, orb_group_count(), ORB_ID, orb_subscribe_multi(), and SENSOR_COUNT_MAX.

Here is the call graph for this function:

◆ ~TemperatureCalibrationBaro()

TemperatureCalibrationBaro::~TemperatureCalibrationBaro ( )
virtual

Definition at line 65 of file baro.cpp.

References TemperatureCalibrationCommon< 1, POLYFIT_ORDER >::_num_sensor_instances, TemperatureCalibrationCommon< 1, POLYFIT_ORDER >::_sensor_subs, and orb_unsubscribe().

Here is the call graph for this function:

Member Function Documentation

◆ finish()

int TemperatureCalibrationBaro::finish ( )
virtual
See also
TemperatureCalibrationBase::finish()

Implements TemperatureCalibrationBase.

Definition at line 154 of file baro.cpp.

References TemperatureCalibrationCommon< 1, POLYFIT_ORDER >::_data, TemperatureCalibrationCommon< 1, POLYFIT_ORDER >::_num_sensor_instances, finish_sensor_instance(), param_find(), and param_set_no_notification().

Here is the call graph for this function:

◆ finish_sensor_instance()

int TemperatureCalibrationBaro::finish_sensor_instance ( PerSensorData &  data,
int  sensor_index 
)
inlineprivate

Definition at line 170 of file baro.cpp.

References param_find(), param_set_no_notification(), POLYFIT_ORDER, and TemperatureCalibrationBase::set_parameter().

Referenced by finish().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_calibration()

void TemperatureCalibrationBaro::reset_calibration ( )
virtual

◆ update_sensor_instance()

int TemperatureCalibrationBaro::update_sensor_instance ( PerSensorData &  data,
int  sensor_sub 
)
privatevirtual

update a single sensor instance

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

Implements TemperatureCalibrationCommon< 1, POLYFIT_ORDER >.

Definition at line 77 of file baro.cpp.

References TemperatureCalibrationBase::_max_start_temperature, TemperatureCalibrationBase::_min_start_temperature, TemperatureCalibrationBase::_min_temperature_rise, TemperatureCalibrationCommon< 1, POLYFIT_ORDER >::_sensor_subs, sensor_baro_s::device_id, hrt_absolute_time(), orb_check(), orb_copy(), ORB_ID, sensor_baro_s::pressure, TC_DEBUG, TC_ERROR_INITIAL_TEMP_TOO_HIGH, and sensor_baro_s::temperature.

Here is the call graph for this function:

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