Sub: use set_default_by_name for GND_EXT_BUS

This commit is contained in:
Peter Barker 2020-12-01 22:17:26 +11:00 committed by Andrew Tridgell
parent 8b5ff1a6de
commit 64e1784cb7

View File

@ -23,11 +23,11 @@ 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_by_name("GND_EXT_BUS", 0); AP_Param::set_default_by_name("GND_EXT_BUS", 0);
celsius.init(0); celsius.init(0);
break; break;
default: default:
AP_Param::set_by_name("GND_EXT_BUS", 1); AP_Param::set_default_by_name("GND_EXT_BUS", 1);
celsius.init(1); celsius.init(1);
break; break;
} }