From 9d887dd347dce1688a3fce46834f1b6e7c02b12b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Betto?= <niccolo.betto@skywarder.eu> Date: Wed, 27 Nov 2024 18:57:03 +0100 Subject: [PATCH] [RIGv2] Map pressure transducers to the new Mavlink message fields Methods in the Sensors class have NOT been updated yet, which means their name is mismatching with the pressure they sample, but they sample correct data. The mavlink message contains the correct name of the pressure value. This will be fixed in the future. --- src/RIGv2/Radio/Radio.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/RIGv2/Radio/Radio.cpp b/src/RIGv2/Radio/Radio.cpp index 09c2aba51..3b5d301f1 100644 --- a/src/RIGv2/Radio/Radio.cpp +++ b/src/RIGv2/Radio/Radio.cpp @@ -549,13 +549,16 @@ bool Radio::enqueueSystemTm(uint8_t tmId) tm.rocket_mass = sensors->getTankWeightLastSample().load; tm.n2o_vessel_mass = sensors->getVesselWeightLastSample().load; + // TODO: methods below have mismatching names tm.n2o_filling_pressure = + sensors->getVesselPressLastSample().pressure; + tm.n2_filling_pressure = sensors->getFillingPressLastSample().pressure; tm.n2o_vessel_pressure = - sensors->getVesselPressLastSample().pressure; + sensors->getBottomTankPressLastSample().pressure; + tm.n2_vessel_1_pressure = + sensors->getTopTankPressLastSample().pressure; - tm.n2_filling_pressure = -1.f; // TODO - tm.n2_vessel_1_pressure = -1.f; // TODO tm.n2_vessel_2_pressure = -1.f; // TODO tm.battery_voltage = sensors->getBatteryVoltageLastSample().voltage; -- GitLab