mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 15:23:57 -04:00
AP_Vehicle: add AP_TemperatureSensor
Co-authored-by: Joshua Henderson <hendjoshsr71@gmail.com>
This commit is contained in:
parent
ecbfd25c08
commit
1254e18fa9
@ -106,6 +106,13 @@ const AP_Param::GroupInfo AP_Vehicle::var_info[] = {
|
||||
// @Path: ../AP_OpenDroneID/AP_OpenDroneID.cpp
|
||||
AP_SUBGROUPINFO(opendroneid, "DID_", 15, AP_Vehicle, AP_OpenDroneID),
|
||||
#endif
|
||||
|
||||
#if AP_TEMPERATURE_SENSOR_ENABLED
|
||||
// @Group: TEMP
|
||||
// @Path: ../AP_TemperatureSensor/AP_TemperatureSensor.cpp
|
||||
AP_SUBGROUPINFO(temperature_sensor, "TEMP", 16, AP_Vehicle, AP_TemperatureSensor),
|
||||
#endif
|
||||
|
||||
AP_GROUPEND
|
||||
};
|
||||
|
||||
@ -249,6 +256,10 @@ void AP_Vehicle::setup()
|
||||
efi.init();
|
||||
#endif
|
||||
|
||||
#if AP_TEMPERATURE_SENSOR_ENABLED
|
||||
temperature_sensor.init();
|
||||
#endif
|
||||
|
||||
#if AP_AIS_ENABLED
|
||||
ais.init();
|
||||
#endif
|
||||
@ -353,6 +364,9 @@ const AP_Scheduler::Task AP_Vehicle::scheduler_tasks[] = {
|
||||
#if OSD_ENABLED
|
||||
SCHED_TASK(publish_osd_info, 1, 10, 240),
|
||||
#endif
|
||||
#if AP_TEMPERATURE_SENSOR_ENABLED
|
||||
SCHED_TASK_CLASS(AP_TemperatureSensor, &vehicle.temperature_sensor, update, 5, 50, 242),
|
||||
#endif
|
||||
#if HAL_INS_ACCELCAL_ENABLED
|
||||
SCHED_TASK(accel_cal_update, 10, 100, 245),
|
||||
#endif
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include <AP_ExternalAHRS/AP_ExternalAHRS.h>
|
||||
#include <AP_VideoTX/AP_SmartAudio.h>
|
||||
#include <AP_VideoTX/AP_Tramp.h>
|
||||
#include <AP_TemperatureSensor/AP_TemperatureSensor.h>
|
||||
#include <SITL/SITL.h>
|
||||
#include <AP_CustomRotations/AP_CustomRotations.h>
|
||||
#include <AP_AIS/AP_AIS.h>
|
||||
@ -405,6 +406,10 @@ protected:
|
||||
AC_Fence fence;
|
||||
#endif
|
||||
|
||||
#if AP_TEMPERATURE_SENSOR_ENABLED
|
||||
AP_TemperatureSensor temperature_sensor;
|
||||
#endif
|
||||
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
static const struct AP_Scheduler::Task scheduler_tasks[];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user