UAVCAN: Overhaul SensorBridge drivers

Supposedly multiple sensor callbacks were supported; in reality, this
was not the case, as the mag SensorBridge in particular can only
calibrate one compass, leading to a race condition on which compass
appears first on the bus to get published and calibrated (with no
warning to the user that the 'wrong' compass is being used).

For sensors with existing generic driver classes (baro and mag) the
sensor bridges use these classes for the driver registration, and uORB
publication, and calibration interface (ioctl) handling.
This commit is contained in:
JacobCrabill
2020-03-21 12:39:29 -04:00
committed by Daniel Agar
parent 79dc313260
commit 4c8cfa140a
8 changed files with 189 additions and 93 deletions
@@ -57,6 +57,8 @@ public:
void update(hrt_abstime timestamp, float pressure);
int get_class_instance(void) { return _class_device_instance; };
void print_status();
private:
@@ -60,6 +60,8 @@ public:
void update(hrt_abstime timestamp_sample, float x, float y, float z);
int get_class_instance(void) { return _class_device_instance; };
void print_status();
private: