mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
Sub: Add support for external pressure sensor in ROV context.
This commit is contained in:
parent
1d9e037e95
commit
3af1dc8c93
@ -244,6 +244,11 @@ void Sub::init_ardupilot()
|
|||||||
// read Baro pressure at ground
|
// read Baro pressure at ground
|
||||||
//-----------------------------
|
//-----------------------------
|
||||||
init_barometer(true);
|
init_barometer(true);
|
||||||
|
if(barometer.num_instances() > 1) {
|
||||||
|
//We have an external MS58XX pressure sensor connected
|
||||||
|
barometer.set_type(1, BARO_TYPE_WATER); //Altitude (depth) is calculated differently underwater
|
||||||
|
barometer.set_precision_multiplier(1, 10); //The MS58XX values reported need to be multiplied by 10 to match units everywhere else
|
||||||
|
}
|
||||||
|
|
||||||
// initialise sonar
|
// initialise sonar
|
||||||
#if CONFIG_SONAR == ENABLED
|
#if CONFIG_SONAR == ENABLED
|
||||||
|
Loading…
Reference in New Issue
Block a user