From ca8436ba5dc19397607f830be1998ca70f7de20d Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 24 Dec 2021 16:47:20 +1100 Subject: [PATCH] AP_DAL: create and use AP_OPTICALFLOW_ENABLED Including a define for each backend. --- libraries/AP_DAL/AP_DAL.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_DAL/AP_DAL.cpp b/libraries/AP_DAL/AP_DAL.cpp index ec9bbd741e..c781b5afd1 100644 --- a/libraries/AP_DAL/AP_DAL.cpp +++ b/libraries/AP_DAL/AP_DAL.cpp @@ -66,7 +66,9 @@ void AP_DAL::start_frame(AP_DAL::FrameType frametype) _RFRN.ahrs_airspeed_sensor_enabled = AP::ahrs().airspeed_sensor_enabled(); _RFRN.available_memory = hal.util->available_memory(); _RFRN.ahrs_trim = ahrs.get_trim(); +#if AP_OPTICALFLOW_ENABLED _RFRN.opticalflow_enabled = AP::opticalflow() && AP::opticalflow()->enabled(); +#endif _RFRN.wheelencoder_enabled = AP::wheelencoder() && (AP::wheelencoder()->num_sensors() > 0); WRITE_REPLAY_BLOCK_IFCHANGED(RFRN, _RFRN, old);