-
Notifications
You must be signed in to change notification settings - Fork 107
core: frontend: onboardSensors: fix internal baro showing as water pressure sensor #2570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: frontend: onboardSensors: fix internal baro showing as water pressure sensor #2570
Conversation
3536127
to
f61ce98
Compare
Nice! Per my comment in #2567, this fixes a bug but is only a partial fix for the observed behaviour, because we’re saying MS5611 is a water sensor (to handle the current misrepresentation of the MS5837 on the Bar30), and the Pixhawk has a genuine MS5611 as its onboard barometer (so that one will still show up as water unless we handle it explicitly). Alternatively we could stop treating MS5611 as water except in the special case where we expect it’s actually an MS5837, e.g. when it’s used on a sub vehicle and connected via I2C instead of SPI. |
hmmm makes sense! we can check if it is on i2c and connected to bus BARO_EXT_BUS |
@ES-Alexander what is the current status of this PR ? Should we merge it ? |
@patrickelectric it wouldn't hurt to merge it as-is, but I think it makes more sense for the I don't know how to actually do those checks, but I think an appropriate pseudocode update would be something like: if (['MS5837', 'MS5611', 'KELLERLD'].includes(compass.deviceName ?? '--')
&& "baro is on I2C, on BARO_EXT_BUS"
&& autopilot.vehicle_type === 'Submarine') {
results[compass.param] = true
} Even better if it actually reports the sensor as water type, instead of us guessing from how it's connected. Also @Williangalvani
|
f61ce98
to
1b4a7e0
Compare
1b4a7e0
to
a5e4b14
Compare
a5e4b14
to
6272845
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed working as expected! :-D
Nice work - this one ended up being more of a slog than expected...
Vehicle setup overview docs may need an updated screenshot. |
tested