Sub: Add support for external pressure sensor in ROV context.

This commit is contained in:
jaxxzer 2016-01-18 00:42:59 -05:00 committed by Andrew Tridgell
parent 1d9e037e95
commit 3af1dc8c93
1 changed files with 5 additions and 0 deletions

View File

@ -244,6 +244,11 @@ void Sub::init_ardupilot()
// read Baro pressure at ground
//-----------------------------
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
#if CONFIG_SONAR == ENABLED