mirror of https://github.com/ArduPilot/ardupilot
Plane: add and use AP_RPM_ENABLED
This commit is contained in:
parent
7a80c2778b
commit
e596f7ce83
|
@ -88,7 +88,9 @@ const AP_Scheduler::Task Plane::scheduler_tasks[] = {
|
|||
SCHED_TASK(one_second_loop, 1, 400, 90),
|
||||
SCHED_TASK(three_hz_loop, 3, 75, 93),
|
||||
SCHED_TASK(check_long_failsafe, 3, 400, 96),
|
||||
#if AP_RPM_ENABLED
|
||||
SCHED_TASK_CLASS(AP_RPM, &plane.rpm_sensor, update, 10, 100, 99),
|
||||
#endif
|
||||
#if AP_AIRSPEED_AUTOCAL_ENABLE
|
||||
SCHED_TASK(airspeed_ratio_update, 1, 100, 102),
|
||||
#endif // AP_AIRSPEED_AUTOCAL_ENABLE
|
||||
|
|
|
@ -961,10 +961,12 @@ const AP_Param::Info Plane::var_info[] = {
|
|||
GOBJECTN(ahrs.EKF3, NavEKF3, "EK3_", NavEKF3),
|
||||
#endif
|
||||
|
||||
#if AP_RPM_ENABLED
|
||||
// @Group: RPM
|
||||
// @Path: ../libraries/AP_RPM/AP_RPM.cpp
|
||||
GOBJECT(rpm_sensor, "RPM", AP_RPM),
|
||||
|
||||
#endif
|
||||
|
||||
// @Group: RSSI_
|
||||
// @Path: ../libraries/AP_RSSI/AP_RSSI.cpp
|
||||
GOBJECT(rssi, "RSSI_", AP_RSSI),
|
||||
|
|
|
@ -194,7 +194,9 @@ private:
|
|||
|
||||
AP_Vehicle::FixedWing::Rangefinder_State rangefinder_state;
|
||||
|
||||
#if AP_RPM_ENABLED
|
||||
AP_RPM rpm_sensor;
|
||||
#endif
|
||||
|
||||
AP_TECS TECS_controller{ahrs, aparm, landing, MASK_LOG_TECS};
|
||||
AP_L1_Control L1_controller{ahrs, &TECS_controller};
|
||||
|
|
|
@ -66,7 +66,9 @@ void Plane::init_ardupilot()
|
|||
|
||||
rssi.init();
|
||||
|
||||
#if AP_RPM_ENABLED
|
||||
rpm_sensor.init();
|
||||
#endif
|
||||
|
||||
// setup telem slots with serial ports
|
||||
gcs().setup_uarts();
|
||||
|
|
Loading…
Reference in New Issue