delete drv_baro.h, drv_mag.h, drv_range_finder.h, drv_device.h and purge UAVCAN CDev usage

This commit is contained in:
Daniel Agar
2021-01-12 22:04:52 -05:00
parent 7f5fae91b0
commit a57b9f9381
55 changed files with 117 additions and 553 deletions
+1 -6
View File
@@ -41,7 +41,6 @@
#include <drivers/device/i2c.h>
#include <drivers/drv_hrt.h>
#include <drivers/drv_range_finder.h>
#include <lib/conversion/rotation.h>
#include <lib/parameters/param.h>
#include <lib/perf/perf_counter.h>
@@ -101,8 +100,6 @@ private:
uint8_t _sonar_rotation;
bool _sensor_ok{false};
bool _collect_phase{false};
int _class_instance{-1};
int _orb_class_instance{-1};
uORB::PublicationMulti<optical_flow_s> _px4flow_topic{ORB_ID(optical_flow)};
uORB::PublicationMulti<distance_sensor_s> _distance_sensor_topic{ORB_ID(distance_sensor)};
@@ -169,8 +166,6 @@ PX4FLOW::init()
return ret;
}
_class_instance = register_class_devname(RANGE_FINDER_BASE_DEVICE_PATH);
ret = OK;
/* sensor is ok, but we don't really know if it is within range */
_sensor_ok = true;
@@ -316,7 +311,7 @@ PX4FLOW::collect()
_px4flow_topic.publish(report);
/* publish to the distance_sensor topic as well */
if (_class_instance == CLASS_DEVICE_PRIMARY) {
if (_distance_sensor_topic.get_instance() == 0) {
distance_sensor_s distance_report{};
distance_report.timestamp = report.timestamp;
distance_report.min_distance = PX4FLOW_MIN_DISTANCE;