diff --git a/ground/gcs/src/plugins/setupwizard/connectiondiagram.cpp b/ground/gcs/src/plugins/setupwizard/connectiondiagram.cpp index a47088e35..5ea7fea46 100644 --- a/ground/gcs/src/plugins/setupwizard/connectiondiagram.cpp +++ b/ground/gcs/src/plugins/setupwizard/connectiondiagram.cpp @@ -213,6 +213,9 @@ void ConnectionDiagram::setupGraphicsScene() case VehicleConfigurationSource::INPUT_EXBUS: elementsToShow << QString("%1exbus").arg(prefix); break; + case VehicleConfigurationSource::INPUT_IBUS: + elementsToShow << QString("%1ibus").arg(prefix); + break; default: break; } diff --git a/ground/gcs/src/plugins/setupwizard/pages/airspeedpage.cpp b/ground/gcs/src/plugins/setupwizard/pages/airspeedpage.cpp index d89e370ba..8182e2bd4 100644 --- a/ground/gcs/src/plugins/setupwizard/pages/airspeedpage.cpp +++ b/ground/gcs/src/plugins/setupwizard/pages/airspeedpage.cpp @@ -46,6 +46,7 @@ void AirSpeedPage::initializePage(VehicleConfigurationSource *settings) settings->getInputType() == VehicleConfigurationSource::INPUT_DSM || settings->getInputType() == VehicleConfigurationSource::INPUT_SRXL || settings->getInputType() == VehicleConfigurationSource::INPUT_HOTT_SUMD || + settings->getInputType() == VehicleConfigurationSource::INPUT_IBUS || settings->getInputType() == VehicleConfigurationSource::INPUT_EXBUS)) || settings->getGpsType() == VehicleConfigurationSource::GPS_UBX_FLEXI_I2CMAG) { // Disable non estimated sensors if ports are taken by receivers or I2C Mag diff --git a/ground/gcs/src/plugins/setupwizard/pages/gpspage.cpp b/ground/gcs/src/plugins/setupwizard/pages/gpspage.cpp index 3f6c4295b..2cba4670b 100644 --- a/ground/gcs/src/plugins/setupwizard/pages/gpspage.cpp +++ b/ground/gcs/src/plugins/setupwizard/pages/gpspage.cpp @@ -46,6 +46,7 @@ void GpsPage::initializePage(VehicleConfigurationSource *settings) settings->getInputType() == VehicleConfigurationSource::INPUT_DSM || settings->getInputType() == VehicleConfigurationSource::INPUT_SRXL || settings->getInputType() == VehicleConfigurationSource::INPUT_HOTT_SUMD || + settings->getInputType() == VehicleConfigurationSource::INPUT_IBUS || settings->getInputType() == VehicleConfigurationSource::INPUT_EXBUS)) { // Disable GPS+I2C Mag setItemDisabled(VehicleConfigurationSource::GPS_UBX_FLEXI_I2CMAG, true); diff --git a/ground/gcs/src/plugins/setupwizard/pages/inputpage.cpp b/ground/gcs/src/plugins/setupwizard/pages/inputpage.cpp index 298236190..87354fc14 100644 --- a/ground/gcs/src/plugins/setupwizard/pages/inputpage.cpp +++ b/ground/gcs/src/plugins/setupwizard/pages/inputpage.cpp @@ -69,6 +69,8 @@ bool InputPage::validatePage() getWizard()->setInputType(SetupWizard::INPUT_HOTT_SUMD); } else if (ui->jetiButton->isChecked()) { getWizard()->setInputType(SetupWizard::INPUT_EXBUS); + } else if (ui->flyskyButton->isChecked()) { + getWizard()->setInputType(SetupWizard::INPUT_IBUS); } else if (ui->spectrumButton->isChecked()) { getWizard()->setInputType(SetupWizard::INPUT_DSM); } else if (ui->multiplexButton->isChecked()) { @@ -112,6 +114,9 @@ bool InputPage::restartNeeded(VehicleConfigurationSource::INPUT_TYPE selectedTyp case VehicleConfigurationSource::INPUT_EXBUS: return data.CC_FlexiPort != HwSettings::CC_FLEXIPORT_EXBUS; + case VehicleConfigurationSource::INPUT_IBUS: + return data.CC_FlexiPort != HwSettings::CC_FLEXIPORT_IBUS; + case VehicleConfigurationSource::INPUT_DSM: // TODO: Handle all of the DSM types ?? Which is most common? return data.CC_MainPort != HwSettings::CC_MAINPORT_DSM; @@ -140,6 +145,9 @@ bool InputPage::restartNeeded(VehicleConfigurationSource::INPUT_TYPE selectedTyp case VehicleConfigurationSource::INPUT_EXBUS: return data.RM_FlexiPort != HwSettings::RM_FLEXIPORT_EXBUS; + case VehicleConfigurationSource::INPUT_IBUS: + return data.RM_FlexiPort != HwSettings::RM_FLEXIPORT_IBUS; + case VehicleConfigurationSource::INPUT_SRXL: return data.RM_FlexiPort != HwSettings::RM_FLEXIPORT_SRXL; @@ -173,6 +181,9 @@ bool InputPage::restartNeeded(VehicleConfigurationSource::INPUT_TYPE selectedTyp case VehicleConfigurationSource::INPUT_EXBUS: return data.SPK2_RcvrPort != HwSettings::SPK2_RCVRPORT_EXBUS; + case VehicleConfigurationSource::INPUT_IBUS: + return data.SPK2_RcvrPort != HwSettings::SPK2_RCVRPORT_IBUS; + default: return true; } break; diff --git a/ground/gcs/src/plugins/setupwizard/pages/inputpage.ui b/ground/gcs/src/plugins/setupwizard/pages/inputpage.ui index 9d17c4f55..eb6147641 100644 --- a/ground/gcs/src/plugins/setupwizard/pages/inputpage.ui +++ b/ground/gcs/src/plugins/setupwizard/pages/inputpage.ui @@ -139,13 +139,6 @@ p, li { white-space: pre-wrap; } - - - - - - 2 - @@ -187,6 +180,13 @@ p, li { white-space: pre-wrap; } + + + + + + 2 + @@ -351,6 +351,47 @@ p, li { white-space: pre-wrap; } + + + + + 10 + + + + FlySky IBus + + + QToolButton { border: none } + + + IBus + + + + :/setupwizard/resources/bttn-ibus-up.png + :/setupwizard/resources/bttn-ibus-down.png:/setupwizard/resources/bttn-ibus-up.png + + + + 100 + 100 + + + + true + + + true + + + Qt::ToolButtonTextUnderIcon + + + true + + + diff --git a/ground/gcs/src/plugins/setupwizard/resources/bttn-ibus-down.png b/ground/gcs/src/plugins/setupwizard/resources/bttn-ibus-down.png new file mode 100644 index 000000000..762b30bd7 Binary files /dev/null and b/ground/gcs/src/plugins/setupwizard/resources/bttn-ibus-down.png differ diff --git a/ground/gcs/src/plugins/setupwizard/resources/bttn-ibus-up.png b/ground/gcs/src/plugins/setupwizard/resources/bttn-ibus-up.png new file mode 100644 index 000000000..a5b0333d4 Binary files /dev/null and b/ground/gcs/src/plugins/setupwizard/resources/bttn-ibus-up.png differ diff --git a/ground/gcs/src/plugins/setupwizard/resources/connection-diagrams.svg b/ground/gcs/src/plugins/setupwizard/resources/connection-diagrams.svg index 5e02a3cf8..7a5acbdea 100644 --- a/ground/gcs/src/plugins/setupwizard/resources/connection-diagrams.svg +++ b/ground/gcs/src/plugins/setupwizard/resources/connection-diagrams.svg @@ -36,7 +36,7 @@ inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" - inkscape:current-layer="layer81" + inkscape:current-layer="layer79" fit-margin-top="15" fit-margin-left="15" fit-margin-right="15" @@ -19218,6 +19218,46 @@ y1="431.8125" x2="276" y2="513.56134" /> + + + + @@ -20041,6 +20081,115 @@ + + + Satellite + + + + + + + + + + + + + + + + + + + + + + + + + style="display:inline" + sodipodi:insensitive="true"> getControllerType() == VehicleConfigurationSource::CONTROLLER_SPARKY2) { + data.SPK2_RcvrPort = HwSettings::SPK2_RCVRPORT_IBUS; + } else { + data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_IBUS; + } + break; default: break; } @@ -999,6 +1009,9 @@ void VehicleConfigurationHelper::applyManualControlDefaults() case VehicleConfigurationSource::INPUT_EXBUS: channelType = ManualControlSettings::CHANNELGROUPS_EXBUS; break; + case VehicleConfigurationSource::INPUT_IBUS: + channelType = ManualControlSettings::CHANNELGROUPS_IBUS; + break; default: break; } diff --git a/ground/gcs/src/plugins/setupwizard/vehicleconfigurationsource.h b/ground/gcs/src/plugins/setupwizard/vehicleconfigurationsource.h index 62fbc926f..00e2a88fb 100644 --- a/ground/gcs/src/plugins/setupwizard/vehicleconfigurationsource.h +++ b/ground/gcs/src/plugins/setupwizard/vehicleconfigurationsource.h @@ -66,7 +66,7 @@ public: GROUNDVEHICLE_MOTORCYCLE, GROUNDVEHICLE_CAR, GROUNDVEHICLE_DIFFERENTIAL }; enum ESC_TYPE { ESC_ONESHOT, ESC_SYNCHED, ESC_RAPID, ESC_STANDARD, ESC_UNKNOWN }; enum SERVO_TYPE { SERVO_ANALOG, SERVO_DIGITAL, SERVO_UNKNOWN }; - enum INPUT_TYPE { INPUT_PWM, INPUT_PPM, INPUT_SBUS, INPUT_DSM, INPUT_SRXL, INPUT_HOTT_SUMD, INPUT_EXBUS, INPUT_UNKNOWN }; + enum INPUT_TYPE { INPUT_PWM, INPUT_PPM, INPUT_SBUS, INPUT_DSM, INPUT_SRXL, INPUT_HOTT_SUMD, INPUT_EXBUS, INPUT_IBUS, INPUT_UNKNOWN }; enum AIRSPEED_TYPE { AIRSPEED_ESTIMATE, AIRSPEED_EAGLETREE, AIRSPEED_MS4525, AIRSPEED_DISABLED }; enum GPS_TYPE { GPS_PLATINUM, GPS_NAZA, GPS_UBX_FLEXI_I2CMAG, GPS_UBX, GPS_NMEA, GPS_DISABLED }; enum RADIO_SETTING { RADIO_TELEMETRY, RADIO_DISABLED }; diff --git a/ground/gcs/src/plugins/setupwizard/wizardResources.qrc b/ground/gcs/src/plugins/setupwizard/wizardResources.qrc index 646558f0c..dffe4bac9 100644 --- a/ground/gcs/src/plugins/setupwizard/wizardResources.qrc +++ b/ground/gcs/src/plugins/setupwizard/wizardResources.qrc @@ -60,5 +60,7 @@ resources/bttn-hott-up.png resources/bttn-exbus-down.png resources/bttn-exbus-up.png + resources/bttn-ibus-down.png + resources/bttn-ibus-up.png