mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-26 15:54:15 +01:00
LP-72 Fix rebase final issues
This commit is contained in:
parent
e6b2d9cb23
commit
57bc1725c1
@ -161,18 +161,18 @@ bool InputPage::restartNeeded(VehicleConfigurationSource::INPUT_TYPE selectedTyp
|
||||
return data.SPK2_RcvrPort != HwSettings::SPK2_RCVRPORT_SBUS;
|
||||
|
||||
case VehicleConfigurationSource::INPUT_SRXL:
|
||||
return data.SPK2_FlexiPort != HwSettings::SPK2_FLEXIPORT_SRXL;
|
||||
return data.SPK2_RcvrPort != HwSettings::SPK2_RCVRPORT_SRXL;
|
||||
|
||||
case VehicleConfigurationSource::INPUT_DSM:
|
||||
// TODO: Handle all of the DSM types ?? Which is most common?
|
||||
return data.SPK2_MainPort != HwSettings::SPK2_RCVRPORT_DSM;
|
||||
return data.SPK2_RcvrPort != HwSettings::SPK2_RCVRPORT_DSM;
|
||||
|
||||
// TODO, Sparky2: Move Hott and Exbus to Receiver port.
|
||||
// TODO: Sparky2: Move Hott and Exbus to Receiver port.
|
||||
case VehicleConfigurationSource::INPUT_HOTT_SUMD:
|
||||
return data.RM_FlexiPort != HwSettings::RM_FLEXIPORT_HOTTSUMD;
|
||||
return data.SPK2_FlexiPort != HwSettings::SPK2_FLEXIPORT_HOTTSUMD;
|
||||
|
||||
case VehicleConfigurationSource::INPUT_EXBUS:
|
||||
return data.RM_FlexiPort != HwSettings::RM_FLEXIPORT_EXBUS;
|
||||
return data.SPK2_FlexiPort != HwSettings::SPK2_FLEXIPORT_EXBUS;
|
||||
|
||||
default: return true;
|
||||
}
|
||||
|
@ -189,10 +189,13 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
|
||||
case VehicleConfigurationSource::CONTROLLER_SPARKY2:
|
||||
case VehicleConfigurationSource::CONTROLLER_DISCOVERYF4:
|
||||
// Reset all ports to their defaults
|
||||
data.RM_RcvrPort = HwSettings::RM_RCVRPORT_DISABLED;
|
||||
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_DISABLED;
|
||||
data.SPK2_RcvrPort = HwSettings::SPK2_RCVRPORT_DISABLED;
|
||||
data.SPK2_FlexiPort = HwSettings::SPK2_FLEXIPORT_DISABLED;
|
||||
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_SPARKY2) {
|
||||
data.SPK2_RcvrPort = HwSettings::SPK2_RCVRPORT_DISABLED;
|
||||
data.SPK2_FlexiPort = HwSettings::SPK2_FLEXIPORT_DISABLED;
|
||||
} else {
|
||||
data.RM_RcvrPort = HwSettings::RM_RCVRPORT_DISABLED;
|
||||
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_DISABLED;
|
||||
}
|
||||
|
||||
// Revo/Sparky2 uses inbuilt Modem do not set mainport to be active telemetry link for Revo/Sparky2
|
||||
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_REVO) {
|
||||
@ -205,9 +208,12 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
|
||||
|
||||
switch (m_configSource->getInputType()) {
|
||||
case VehicleConfigurationSource::INPUT_PWM:
|
||||
data.RM_RcvrPort = HwSettings::RM_RCVRPORT_PWM;
|
||||
// this should not happen, sparky2 does not allow pwm
|
||||
data.SPK2_RcvrPort = HwSettings::SPK2_RCVRPORT_DISABLED;
|
||||
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_SPARKY2) {
|
||||
// this should not happen, sparky2 does not allow pwm
|
||||
data.SPK2_RcvrPort = HwSettings::SPK2_RCVRPORT_DISABLED;
|
||||
} else {
|
||||
data.RM_RcvrPort = HwSettings::RM_RCVRPORT_PWM;
|
||||
}
|
||||
break;
|
||||
case VehicleConfigurationSource::INPUT_PPM:
|
||||
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_SPARKY2) {
|
||||
@ -242,12 +248,18 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
|
||||
}
|
||||
break;
|
||||
case VehicleConfigurationSource::INPUT_HOTT_SUMD:
|
||||
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_HOTTSUMD;
|
||||
data.SPK2_FlexiPort = HwSettings::SPK2_FLEXIPORT_HOTTSUMD;
|
||||
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_SPARKY2) {
|
||||
data.SPK2_FlexiPort = HwSettings::SPK2_FLEXIPORT_HOTTSUMD;
|
||||
} else {
|
||||
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_HOTTSUMD;
|
||||
}
|
||||
break;
|
||||
case VehicleConfigurationSource::INPUT_EXBUS:
|
||||
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_EXBUS;
|
||||
data.SPK2_FlexiPort = HwSettings::SPK2_FLEXIPORT_EXBUS;
|
||||
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_SPARKY2) {
|
||||
data.SPK2_FlexiPort = HwSettings::SPK2_FLEXIPORT_EXBUS;
|
||||
} else {
|
||||
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_EXBUS;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -317,12 +329,11 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
|
||||
gpsData.DataProtocol = GPSSettings::DATAPROTOCOL_UBX;
|
||||
gpsData.UbxAutoConfig = GPSSettings::UBXAUTOCONFIG_AUTOBAUDANDCONFIGURE;
|
||||
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_SPARKY2) {
|
||||
data.SPK2_I2CPort = HwSettings::SPK2_I2CPORT_I2C;
|
||||
magsData.Type = AuxMagSettings::TYPE_EXT;
|
||||
data.SPK2_FlexiPort = HwSettings::SPK2_FLEXIPORT_I2C;
|
||||
} else {
|
||||
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_I2C;
|
||||
magsData.Type = AuxMagSettings::TYPE_FLEXI;
|
||||
}
|
||||
magsData.Type = AuxMagSettings::TYPE_FLEXI;
|
||||
magsData.Usage = AuxMagSettings::USAGE_AUXONLY;
|
||||
magSettings->setData(magsData);
|
||||
addModifiedObject(magSettings, tr("Writing I2C Mag sensor settings"));
|
||||
|
@ -6,7 +6,7 @@
|
||||
defaultvalue="1,0,0,0,1,0,0,0,1"/>
|
||||
<field name="MagBiasNullingRate" units="" type="float" elements="1" defaultvalue="0"/>
|
||||
<field name="BoardRotation" units="deg" type="int16" elementnames="Roll,Pitch,Yaw" defaultvalue="0,0,0"/>
|
||||
<field name="Type" units="" type="enum" elements="1" options="GPSV9,Ext,Flexi,I2C,DJI" defaultvalue="GPSV9"/>
|
||||
<field name="Type" units="" type="enum" elements="1" options="GPSV9,Flexi,I2C,DJI" defaultvalue="GPSV9"/>
|
||||
<field name="Usage" units="" type="enum" elements="1" options="Both,OnboardOnly,AuxOnly" defaultvalue="Both"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user