1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-30 15:52:12 +01:00

OP-1901 Adding support for SRXL in vehicle wizard.

This commit is contained in:
m_thread 2015-05-26 22:20:46 +02:00
parent 03cef4ee89
commit 924503de48
7 changed files with 54 additions and 5 deletions

View File

@ -55,6 +55,8 @@ bool InputPage::validatePage()
getWizard()->setInputType(SetupWizard::INPUT_SBUS);
} else if (ui->spectrumButton->isChecked()) {
getWizard()->setInputType(SetupWizard::INPUT_DSM);
} else if (ui->multiplexButton->isChecked()){
getWizard()->setInputType(SetupWizard::INPUT_SRXL);
} else {
getWizard()->setInputType(SetupWizard::INPUT_PWM);
}
@ -79,17 +81,15 @@ bool InputPage::restartNeeded(VehicleConfigurationSource::INPUT_TYPE selectedTyp
switch (selectedType) {
case VehicleConfigurationSource::INPUT_PWM:
return data.RM_RcvrPort != HwSettings::RM_RCVRPORT_PWM;
case VehicleConfigurationSource::INPUT_PPM:
return data.RM_RcvrPort != HwSettings::RM_RCVRPORT_PPM;
case VehicleConfigurationSource::INPUT_SBUS:
return data.RM_MainPort != HwSettings::RM_MAINPORT_SBUS;
case VehicleConfigurationSource::INPUT_SRXL:
return data.RM_FlexiPort != HwSettings::RM_FLEXIPORT_SRXL;
case VehicleConfigurationSource::INPUT_DSM:
// TODO: Handle all of the DSM types ?? Which is most common?
return data.RM_MainPort != HwSettings::RM_MAINPORT_DSM;
default: return true;
}
break;

View File

@ -218,6 +218,47 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="multiplexButton">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="toolTip">
<string>Spektrum Satellite</string>
</property>
<property name="styleSheet">
<string notr="true">QToolButton { border: none }</string>
</property>
<property name="text">
<string>SRXL</string>
</property>
<property name="icon">
<iconset resource="../wizardResources.qrc">
<normaloff>:/setupwizard/resources/bttn-srxl-up.png</normaloff>
<normalon>:/setupwizard/resources/bttn-srxl-down.png</normalon>:/setupwizard/resources/bttn-srxl-up.png</iconset>
</property>
<property name="iconSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoExclusive">
<bool>true</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -159,6 +159,9 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
case VehicleConfigurationSource::INPUT_DSM:
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_DSM;
break;
case VehicleConfigurationSource::INPUT_SRXL:
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_SRXL;
break;
default:
break;
}
@ -805,6 +808,9 @@ void VehicleConfigurationHelper::applyManualControlDefaults()
case VehicleConfigurationSource::INPUT_DSM:
channelType = ManualControlSettings::CHANNELGROUPS_DSMFLEXIPORT;
break;
case VehicleConfigurationSource::INPUT_SRXL:
channelType = ManualControlSettings::CHANNELGROUPS_SRXL;
break;
default:
break;
}

View File

@ -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_UNKNOWN };
enum INPUT_TYPE { INPUT_PWM, INPUT_PPM, INPUT_SBUS, INPUT_DSM, INPUT_SRXL, INPUT_UNKNOWN };
enum AIRSPEED_TYPE { AIRSPEED_ESTIMATE, AIRSPEED_EAGLETREE, AIRSPEED_MS4525, AIRSPEED_DISABLED };
enum GPS_TYPE { GPS_PLATINUM, GPS_UBX, GPS_NMEA, GPS_DISABLED };
enum RADIO_SETTING { RADIO_TELEMETRY, RADIO_DISABLED };

View File

@ -54,5 +54,7 @@
<file>resources/connected.png</file>
<file>resources/bttn-oneshot-dwn.png</file>
<file>resources/bttn-oneshot-up.png</file>
<file>resources/bttn-srxl-down.png</file>
<file>resources/bttn-srxl-up.png</file>
</qresource>
</RCC>