Open FlorianPix opened 2 years ago
Looks like it slipped through because we're not actively testing this driver.
Would you like to open a PR addressing this (maybe along with #20051)? We should make sure it's included in the build system going forward.
Describe the bug
../../src/drivers/barometer/ms5837/MS5837.cpp: In member function 'int MS5837::_collect()':
../../src/drivers/barometer/ms5837/MS5837.cpp:343:29: error: 'T' was not declared in this scope
343 | sensor_baro.temperature = T;
To Reproduce
add_subdirectory(ms5837)
)make px4_fmu-v5_rtps boardconfig
make px4_fmu-v5_rtps
Expected behavior
If I understood the state machine of the driver correctly from the comments in MS5837.hpp, T should represent the temperature that was measured in the last poll cylce.
Solution
T
with a_last_temperature
_last_temperature
is initialized as NAN but that shouldn't be an issue as the state machine always first does a measurement before entering the state where it is used