mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Sub: use BARO instead of GND prefix to set default baro parameters
This updates the code to deal with the changes from 3f6fd49507
This commit is contained in:
parent
5f039ba06d
commit
da906f6b0f
@ -40,17 +40,17 @@ void Sub::init_ardupilot()
|
|||||||
// Detection won't work until after BoardConfig.init()
|
// Detection won't work until after BoardConfig.init()
|
||||||
switch (AP_BoardConfig::get_board_type()) {
|
switch (AP_BoardConfig::get_board_type()) {
|
||||||
case AP_BoardConfig::PX4_BOARD_PIXHAWK2:
|
case AP_BoardConfig::PX4_BOARD_PIXHAWK2:
|
||||||
AP_Param::set_default_by_name("GND_EXT_BUS", 0);
|
AP_Param::set_default_by_name("BARO_EXT_BUS", 0);
|
||||||
break;
|
break;
|
||||||
case AP_BoardConfig::PX4_BOARD_PIXHAWK:
|
case AP_BoardConfig::PX4_BOARD_PIXHAWK:
|
||||||
AP_Param::set_by_name("GND_EXT_BUS", 1);
|
AP_Param::set_by_name("BARO_EXT_BUS", 1);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
AP_Param::set_default_by_name("GND_EXT_BUS", 1);
|
AP_Param::set_default_by_name("BARO_EXT_BUS", 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
AP_Param::set_default_by_name("GND_EXT_BUS", 1);
|
AP_Param::set_default_by_name("BARO_EXT_BUS", 1);
|
||||||
#endif
|
#endif
|
||||||
celsius.init(barometer.external_bus());
|
celsius.init(barometer.external_bus());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user