mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-31 16:52:10 +01:00
LP-72 Sparky2 Wizard: Move Hott and ExBus to ReceiverPort
This commit is contained in:
parent
bcea35a8e1
commit
b6fbfba2af
@ -47,8 +47,6 @@ void AirSpeedPage::initializePage(VehicleConfigurationSource *settings)
|
|||||||
settings->getInputType() == VehicleConfigurationSource::INPUT_SRXL ||
|
settings->getInputType() == VehicleConfigurationSource::INPUT_SRXL ||
|
||||||
settings->getInputType() == VehicleConfigurationSource::INPUT_HOTT_SUMD ||
|
settings->getInputType() == VehicleConfigurationSource::INPUT_HOTT_SUMD ||
|
||||||
settings->getInputType() == VehicleConfigurationSource::INPUT_EXBUS)) ||
|
settings->getInputType() == VehicleConfigurationSource::INPUT_EXBUS)) ||
|
||||||
(isSparky && (settings->getInputType() == VehicleConfigurationSource::INPUT_HOTT_SUMD ||
|
|
||||||
settings->getInputType() == VehicleConfigurationSource::INPUT_EXBUS)) ||
|
|
||||||
settings->getGpsType() == VehicleConfigurationSource::GPS_UBX_FLEXI_I2CMAG) {
|
settings->getGpsType() == VehicleConfigurationSource::GPS_UBX_FLEXI_I2CMAG) {
|
||||||
// Disable non estimated sensors if ports are taken by receivers or I2C Mag
|
// Disable non estimated sensors if ports are taken by receivers or I2C Mag
|
||||||
setItemDisabled(VehicleConfigurationSource::AIRSPEED_EAGLETREE, true);
|
setItemDisabled(VehicleConfigurationSource::AIRSPEED_EAGLETREE, true);
|
||||||
|
@ -41,12 +41,12 @@ void GpsPage::initializePage(VehicleConfigurationSource *settings)
|
|||||||
setItemDisabled(-1, false);
|
setItemDisabled(-1, false);
|
||||||
|
|
||||||
bool isSparky = (getWizard()->getControllerType() == SetupWizard::CONTROLLER_SPARKY2);
|
bool isSparky = (getWizard()->getControllerType() == SetupWizard::CONTROLLER_SPARKY2);
|
||||||
// Sbus, dsm and srxl are on rcvrport for sparky2, that leaves mainport/flexiport available for gps/auxmag
|
// All rcinputs are on rcvrport for sparky2, that leaves mainport/flexiport available for gps/auxmag
|
||||||
if ((!isSparky && (settings->getInputType() == VehicleConfigurationSource::INPUT_SBUS)) ||
|
if (!isSparky && (settings->getInputType() == VehicleConfigurationSource::INPUT_SBUS ||
|
||||||
(!isSparky && (settings->getInputType() == VehicleConfigurationSource::INPUT_DSM)) ||
|
settings->getInputType() == VehicleConfigurationSource::INPUT_DSM ||
|
||||||
(!isSparky && (settings->getInputType() == VehicleConfigurationSource::INPUT_SRXL)) ||
|
settings->getInputType() == VehicleConfigurationSource::INPUT_SRXL ||
|
||||||
settings->getInputType() == VehicleConfigurationSource::INPUT_HOTT_SUMD ||
|
settings->getInputType() == VehicleConfigurationSource::INPUT_HOTT_SUMD ||
|
||||||
settings->getInputType() == VehicleConfigurationSource::INPUT_EXBUS) {
|
settings->getInputType() == VehicleConfigurationSource::INPUT_EXBUS)) {
|
||||||
// Disable GPS+I2C Mag
|
// Disable GPS+I2C Mag
|
||||||
setItemDisabled(VehicleConfigurationSource::GPS_UBX_FLEXI_I2CMAG, true);
|
setItemDisabled(VehicleConfigurationSource::GPS_UBX_FLEXI_I2CMAG, true);
|
||||||
if (getSelectedItem()->id() == VehicleConfigurationSource::GPS_UBX_FLEXI_I2CMAG) {
|
if (getSelectedItem()->id() == VehicleConfigurationSource::GPS_UBX_FLEXI_I2CMAG) {
|
||||||
|
@ -167,12 +167,11 @@ bool InputPage::restartNeeded(VehicleConfigurationSource::INPUT_TYPE selectedTyp
|
|||||||
// TODO: Handle all of the DSM types ?? Which is most common?
|
// TODO: Handle all of the DSM types ?? Which is most common?
|
||||||
return data.SPK2_RcvrPort != HwSettings::SPK2_RCVRPORT_DSM;
|
return data.SPK2_RcvrPort != HwSettings::SPK2_RCVRPORT_DSM;
|
||||||
|
|
||||||
// TODO: Sparky2: Move Hott and Exbus to Receiver port.
|
|
||||||
case VehicleConfigurationSource::INPUT_HOTT_SUMD:
|
case VehicleConfigurationSource::INPUT_HOTT_SUMD:
|
||||||
return data.SPK2_FlexiPort != HwSettings::SPK2_FLEXIPORT_HOTTSUMD;
|
return data.SPK2_RcvrPort != HwSettings::SPK2_RCVRPORT_HOTTSUMD;
|
||||||
|
|
||||||
case VehicleConfigurationSource::INPUT_EXBUS:
|
case VehicleConfigurationSource::INPUT_EXBUS:
|
||||||
return data.SPK2_FlexiPort != HwSettings::SPK2_FLEXIPORT_EXBUS;
|
return data.SPK2_RcvrPort != HwSettings::SPK2_RCVRPORT_EXBUS;
|
||||||
|
|
||||||
default: return true;
|
default: return true;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
inkscape:window-x="0"
|
inkscape:window-x="0"
|
||||||
inkscape:window-y="27"
|
inkscape:window-y="27"
|
||||||
inkscape:window-maximized="1"
|
inkscape:window-maximized="1"
|
||||||
inkscape:current-layer="layer76"
|
inkscape:current-layer="layer81"
|
||||||
fit-margin-top="15"
|
fit-margin-top="15"
|
||||||
fit-margin-left="15"
|
fit-margin-left="15"
|
||||||
fit-margin-right="15"
|
fit-margin-right="15"
|
||||||
@ -22136,7 +22136,7 @@
|
|||||||
sodipodi:insensitive="true">
|
sodipodi:insensitive="true">
|
||||||
<g
|
<g
|
||||||
style="display:inline"
|
style="display:inline"
|
||||||
id="sparky2-hott-rxport"
|
id="sparky2-hott"
|
||||||
transform="matrix(-0.4,0,0,-0.4,1133.7231,497.55198)">
|
transform="matrix(-0.4,0,0,-0.4,1133.7231,497.55198)">
|
||||||
<path
|
<path
|
||||||
id="path9857-8-8-1-1-4-0-9-3-2-6"
|
id="path9857-8-8-1-1-4-0-9-3-2-6"
|
||||||
@ -22257,7 +22257,7 @@
|
|||||||
sodipodi:insensitive="true">
|
sodipodi:insensitive="true">
|
||||||
<g
|
<g
|
||||||
style="display:inline"
|
style="display:inline"
|
||||||
id="sparky2-exbus-rxport"
|
id="sparky2-exbus"
|
||||||
transform="matrix(-0.4,0,0,-0.4,1165.0977,527.54311)">
|
transform="matrix(-0.4,0,0,-0.4,1165.0977,527.54311)">
|
||||||
<path
|
<path
|
||||||
id="path9857-8-8-1-1-4-0-9-3-2-7-4"
|
id="path9857-8-8-1-1-4-0-9-3-2-7-4"
|
||||||
@ -22376,7 +22376,7 @@
|
|||||||
sodipodi:insensitive="true">
|
sodipodi:insensitive="true">
|
||||||
<g
|
<g
|
||||||
style="display:inline"
|
style="display:inline"
|
||||||
id="sparky2-hott"
|
id="sparky2-hott-flexi"
|
||||||
transform="matrix(-0.4,0,0,-0.4,1044.7231,497.55198)">
|
transform="matrix(-0.4,0,0,-0.4,1044.7231,497.55198)">
|
||||||
<path
|
<path
|
||||||
id="path9857-8-8-1-1-4-0-9-3-2-6-2"
|
id="path9857-8-8-1-1-4-0-9-3-2-6-2"
|
||||||
@ -22497,7 +22497,7 @@
|
|||||||
sodipodi:insensitive="true">
|
sodipodi:insensitive="true">
|
||||||
<g
|
<g
|
||||||
style="display:inline"
|
style="display:inline"
|
||||||
id="sparky2-exbus"
|
id="sparky2-exbus-flexi"
|
||||||
transform="matrix(-0.4,0,0,-0.4,1076.0977,527.54311)">
|
transform="matrix(-0.4,0,0,-0.4,1076.0977,527.54311)">
|
||||||
<path
|
<path
|
||||||
id="path9857-8-8-1-1-4-0-9-3-2-7-4-1"
|
id="path9857-8-8-1-1-4-0-9-3-2-7-4-1"
|
||||||
|
Before Width: | Height: | Size: 4.6 MiB After Width: | Height: | Size: 4.6 MiB |
@ -249,14 +249,14 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
|
|||||||
break;
|
break;
|
||||||
case VehicleConfigurationSource::INPUT_HOTT_SUMD:
|
case VehicleConfigurationSource::INPUT_HOTT_SUMD:
|
||||||
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_SPARKY2) {
|
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_SPARKY2) {
|
||||||
data.SPK2_FlexiPort = HwSettings::SPK2_FLEXIPORT_HOTTSUMD;
|
data.SPK2_RcvrPort = HwSettings::SPK2_RCVRPORT_HOTTSUMD;
|
||||||
} else {
|
} else {
|
||||||
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_HOTTSUMD;
|
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_HOTTSUMD;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VehicleConfigurationSource::INPUT_EXBUS:
|
case VehicleConfigurationSource::INPUT_EXBUS:
|
||||||
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_SPARKY2) {
|
if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_SPARKY2) {
|
||||||
data.SPK2_FlexiPort = HwSettings::SPK2_FLEXIPORT_EXBUS;
|
data.SPK2_RcvrPort = HwSettings::SPK2_RCVRPORT_EXBUS;
|
||||||
} else {
|
} else {
|
||||||
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_EXBUS;
|
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_EXBUS;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user