AP_TemperatureSensor: allow testing of temperature sending in SITL
This commit is contained in:
parent
c91ba19e7f
commit
7dd023744f
@ -16,12 +16,21 @@ public:
|
||||
|
||||
bool init(void);
|
||||
float temperature(void) { return _temperature; } // temperature in degrees C
|
||||
bool healthy(void) { return _healthy; } // do we have a valid temperature reading?
|
||||
bool healthy(void) { // do we have a valid temperature reading?
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
||||
return true;
|
||||
#endif
|
||||
return _healthy;
|
||||
}
|
||||
|
||||
AP_HAL::OwnPtr<AP_HAL::Device> _dev;
|
||||
|
||||
private:
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
||||
float _temperature = 42.42; // degrees C
|
||||
#else
|
||||
float _temperature; // degrees C
|
||||
#endif
|
||||
bool _healthy; // we have a valid temperature reading to report
|
||||
uint16_t _k[5]; // internal calibration for temperature calculation
|
||||
bool _reset(void); // reset device
|
||||
|
Loading…
Reference in New Issue
Block a user