AP_UAVCAN: create and use AP_OPTICALFLOW_ENABLED

Including a define for each backend.
This commit is contained in:
Peter Barker 2021-12-24 16:47:21 +11:00 committed by Andrew Tridgell
parent 1b0f21e2a3
commit a741499cff

View File

@ -290,7 +290,9 @@ void AP_UAVCAN::init(uint8_t driver_index, bool enable_filters)
AP_Baro_UAVCAN::subscribe_msgs(this);
AP_BattMonitor_UAVCAN::subscribe_msgs(this);
AP_Airspeed_UAVCAN::subscribe_msgs(this);
#if AP_OPTICALFLOW_HEREFLOW_ENABLED
AP_OpticalFlow_HereFlow::subscribe_msgs(this);
#endif
AP_RangeFinder_UAVCAN::subscribe_msgs(this);
act_out_array[driver_index] = new uavcan::Publisher<uavcan::equipment::actuator::ArrayCommand>(*_node);