Browse Source

ArduSub: rename OpticalFlow class to AP_OpticalFlow

Brings us in-line with other classes in ArduPilot.

Removes ambiguity with AP_HAL::OpticalFlow which can cause compilation errors as we start to make code more portable across targets
master
Peter Barker 3 years ago committed by Peter Barker
parent
commit
2cb5a0cc26
  1. 2
      ArduSub/ArduSub.cpp
  2. 2
      ArduSub/GCS_Sub.cpp
  3. 2
      ArduSub/Parameters.cpp
  4. 2
      ArduSub/Sub.h

2
ArduSub/ArduSub.cpp

@ -72,7 +72,7 @@ const AP_Scheduler::Task Sub::scheduler_tasks[] = { @@ -72,7 +72,7 @@ const AP_Scheduler::Task Sub::scheduler_tasks[] = {
SCHED_TASK(fifty_hz_loop, 50, 75, 3),
SCHED_TASK_CLASS(AP_GPS, &sub.gps, update, 50, 200, 6),
#if AP_OPTICALFLOW_ENABLED
SCHED_TASK_CLASS(OpticalFlow, &sub.optflow, update, 200, 160, 9),
SCHED_TASK_CLASS(AP_OpticalFlow, &sub.optflow, update, 200, 160, 9),
#endif
SCHED_TASK(update_batt_compass, 10, 120, 12),
SCHED_TASK(read_rangefinder, 20, 100, 15),

2
ArduSub/GCS_Sub.cpp

@ -57,7 +57,7 @@ void GCS_Sub::update_vehicle_sensor_status_flags() @@ -57,7 +57,7 @@ void GCS_Sub::update_vehicle_sensor_status_flags()
}
#if AP_OPTICALFLOW_ENABLED
const OpticalFlow *optflow = AP::opticalflow();
const AP_OpticalFlow *optflow = AP::opticalflow();
if (optflow && optflow->enabled()) {
control_sensors_present |= MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW;
control_sensors_enabled |= MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW;

2
ArduSub/Parameters.cpp

@ -596,7 +596,7 @@ const AP_Param::Info Sub::var_info[] = { @@ -596,7 +596,7 @@ const AP_Param::Info Sub::var_info[] = {
#if AP_OPTICALFLOW_ENABLED
// @Group: FLOW
// @Path: ../libraries/AP_OpticalFlow/AP_OpticalFlow.cpp
GOBJECT(optflow, "FLOW", OpticalFlow),
GOBJECT(optflow, "FLOW", AP_OpticalFlow),
#endif
#if RPM_ENABLED == ENABLED

2
ArduSub/Sub.h

@ -163,7 +163,7 @@ private: @@ -163,7 +163,7 @@ private:
// Optical flow sensor
#if AP_OPTICALFLOW_ENABLED
OpticalFlow optflow;
AP_OpticalFlow optflow;
#endif
// system time in milliseconds of last recorded yaw reset from ekf

Loading…
Cancel
Save