mirror of https://github.com/ArduPilot/ardupilot
Sub: use enum-class for RangeFinder type
This commit is contained in:
parent
ea26e94f66
commit
db36ef3433
|
@ -700,7 +700,7 @@ void Sub::load_parameters()
|
|||
AP_Param::set_default_by_name("MNT_JSTICK_SPD", 100);
|
||||
AP_Param::set_by_name("MNT_RC_IN_PAN", 7);
|
||||
AP_Param::set_by_name("MNT_RC_IN_TILT", 8);
|
||||
AP_Param::set_default_by_name("RNGFND1_TYPE", RangeFinder::RangeFinder_TYPE_MAVLink);
|
||||
AP_Param::set_default_by_name("RNGFND1_TYPE", (uint8_t)RangeFinder::Type::MAVLink);
|
||||
}
|
||||
|
||||
void Sub::convert_old_parameters()
|
||||
|
|
|
@ -361,7 +361,7 @@ bool RangeFinder::_add_backend(AP_RangeFinder_Backend *backend)
|
|||
*/
|
||||
void RangeFinder::detect_instance(uint8_t instance, uint8_t& serial_instance)
|
||||
{
|
||||
const RangeFinder::Type _type = (Type)params[instance].type.get();
|
||||
const Type _type = (Type)params[instance].type.get();
|
||||
switch (_type) {
|
||||
case Type::PLI2C:
|
||||
case Type::PLI2CV3:
|
||||
|
|
Loading…
Reference in New Issue