uavcannode: Fix dronecan baro units

This commit is contained in:
Alex Klimaj 2022-06-17 12:22:15 -06:00 committed by GitHub
parent b9475d6ebe
commit 60450e63c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ public:
if (uORB::SubscriptionCallbackWorkItem::update(&baro)) {
uavcan::equipment::air_data::StaticPressure static_pressure{};
static_pressure.static_pressure = baro.pressure * 100; // millibar -> pascals
static_pressure.static_pressure = baro.pressure;
uavcan::Publisher<uavcan::equipment::air_data::StaticPressure>::broadcast(static_pressure);
// ensure callback is registered