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

#include <gyro.h>

Inheritance diagram for TemperatureCalibrationGyro:
Collaboration diagram for TemperatureCalibrationGyro:

Public Member Functions

 TemperatureCalibrationGyro (float min_temperature_rise, float min_start_temperature, float max_start_temperature, int gyro_subs[], int num_gyros)
 
virtual ~TemperatureCalibrationGyro ()
 
int finish ()
 
void reset_calibration ()
 
- Public Member Functions inherited from TemperatureCalibrationCommon< 3, 3 >
 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< 3, 3 >
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 39 of file gyro.h.

Constructor & Destructor Documentation

◆ TemperatureCalibrationGyro()

TemperatureCalibrationGyro::TemperatureCalibrationGyro ( float  min_temperature_rise,
float  min_start_temperature,
float  max_start_temperature,
int  gyro_subs[],
int  num_gyros 
)

◆ ~TemperatureCalibrationGyro()

virtual TemperatureCalibrationGyro::~TemperatureCalibrationGyro ( )
inlinevirtual

Definition at line 44 of file gyro.h.

References data, finish(), finish_sensor_instance(), reset_calibration(), and update_sensor_instance().

Here is the call graph for this function:

Member Function Documentation

◆ finish()

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

Implements TemperatureCalibrationBase.

Definition at line 156 of file gyro.cpp.

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

Referenced by ~TemperatureCalibrationGyro().

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

◆ finish_sensor_instance()

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

Definition at line 172 of file gyro.cpp.

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

Referenced by finish(), and ~TemperatureCalibrationGyro().

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

◆ reset_calibration()

void TemperatureCalibrationGyro::reset_calibration ( )
virtual
See also
TemperatureCalibrationBase::reset_calibration()

Implements TemperatureCalibrationBase.

Definition at line 59 of file gyro.cpp.

References TemperatureCalibrationBase::set_parameter().

Referenced by ~TemperatureCalibrationGyro().

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

◆ update_sensor_instance()

int TemperatureCalibrationGyro::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< 3, 3 >.

Definition at line 75 of file gyro.cpp.

References TemperatureCalibrationBase::_max_start_temperature, TemperatureCalibrationBase::_min_start_temperature, TemperatureCalibrationBase::_min_temperature_rise, TemperatureCalibrationCommon< 3, 3 >::_sensor_subs, sensor_gyro_s::device_id, hrt_absolute_time(), orb_check(), orb_copy(), ORB_ID, TC_DEBUG, TC_ERROR_INITIAL_TEMP_TOO_HIGH, sensor_gyro_s::temperature, sensor_gyro_s::x, sensor_gyro_s::y, and sensor_gyro_s::z.

Referenced by ~TemperatureCalibrationGyro().

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

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