mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-06 21:54:15 +01:00
OP-1901 Adding support for SRXL in vehicle wizard.
This commit is contained in:
parent
03cef4ee89
commit
924503de48
@ -55,6 +55,8 @@ bool InputPage::validatePage()
|
|||||||
getWizard()->setInputType(SetupWizard::INPUT_SBUS);
|
getWizard()->setInputType(SetupWizard::INPUT_SBUS);
|
||||||
} else if (ui->spectrumButton->isChecked()) {
|
} else if (ui->spectrumButton->isChecked()) {
|
||||||
getWizard()->setInputType(SetupWizard::INPUT_DSM);
|
getWizard()->setInputType(SetupWizard::INPUT_DSM);
|
||||||
|
} else if (ui->multiplexButton->isChecked()){
|
||||||
|
getWizard()->setInputType(SetupWizard::INPUT_SRXL);
|
||||||
} else {
|
} else {
|
||||||
getWizard()->setInputType(SetupWizard::INPUT_PWM);
|
getWizard()->setInputType(SetupWizard::INPUT_PWM);
|
||||||
}
|
}
|
||||||
@ -79,17 +81,15 @@ bool InputPage::restartNeeded(VehicleConfigurationSource::INPUT_TYPE selectedTyp
|
|||||||
switch (selectedType) {
|
switch (selectedType) {
|
||||||
case VehicleConfigurationSource::INPUT_PWM:
|
case VehicleConfigurationSource::INPUT_PWM:
|
||||||
return data.RM_RcvrPort != HwSettings::RM_RCVRPORT_PWM;
|
return data.RM_RcvrPort != HwSettings::RM_RCVRPORT_PWM;
|
||||||
|
|
||||||
case VehicleConfigurationSource::INPUT_PPM:
|
case VehicleConfigurationSource::INPUT_PPM:
|
||||||
return data.RM_RcvrPort != HwSettings::RM_RCVRPORT_PPM;
|
return data.RM_RcvrPort != HwSettings::RM_RCVRPORT_PPM;
|
||||||
|
|
||||||
case VehicleConfigurationSource::INPUT_SBUS:
|
case VehicleConfigurationSource::INPUT_SBUS:
|
||||||
return data.RM_MainPort != HwSettings::RM_MAINPORT_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:
|
case VehicleConfigurationSource::INPUT_DSM:
|
||||||
// TODO: Handle all of the DSM types ?? Which is most common?
|
// TODO: Handle all of the DSM types ?? Which is most common?
|
||||||
return data.RM_MainPort != HwSettings::RM_MAINPORT_DSM;
|
return data.RM_MainPort != HwSettings::RM_MAINPORT_DSM;
|
||||||
|
|
||||||
default: return true;
|
default: return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -218,6 +218,47 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
@ -159,6 +159,9 @@ void VehicleConfigurationHelper::applyHardwareConfiguration()
|
|||||||
case VehicleConfigurationSource::INPUT_DSM:
|
case VehicleConfigurationSource::INPUT_DSM:
|
||||||
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_DSM;
|
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_DSM;
|
||||||
break;
|
break;
|
||||||
|
case VehicleConfigurationSource::INPUT_SRXL:
|
||||||
|
data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_SRXL;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -805,6 +808,9 @@ void VehicleConfigurationHelper::applyManualControlDefaults()
|
|||||||
case VehicleConfigurationSource::INPUT_DSM:
|
case VehicleConfigurationSource::INPUT_DSM:
|
||||||
channelType = ManualControlSettings::CHANNELGROUPS_DSMFLEXIPORT;
|
channelType = ManualControlSettings::CHANNELGROUPS_DSMFLEXIPORT;
|
||||||
break;
|
break;
|
||||||
|
case VehicleConfigurationSource::INPUT_SRXL:
|
||||||
|
channelType = ManualControlSettings::CHANNELGROUPS_SRXL;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ public:
|
|||||||
GROUNDVEHICLE_MOTORCYCLE, GROUNDVEHICLE_CAR, GROUNDVEHICLE_DIFFERENTIAL };
|
GROUNDVEHICLE_MOTORCYCLE, GROUNDVEHICLE_CAR, GROUNDVEHICLE_DIFFERENTIAL };
|
||||||
enum ESC_TYPE { ESC_ONESHOT, ESC_SYNCHED, ESC_RAPID, ESC_STANDARD, ESC_UNKNOWN };
|
enum ESC_TYPE { ESC_ONESHOT, ESC_SYNCHED, ESC_RAPID, ESC_STANDARD, ESC_UNKNOWN };
|
||||||
enum SERVO_TYPE { SERVO_ANALOG, SERVO_DIGITAL, SERVO_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 AIRSPEED_TYPE { AIRSPEED_ESTIMATE, AIRSPEED_EAGLETREE, AIRSPEED_MS4525, AIRSPEED_DISABLED };
|
||||||
enum GPS_TYPE { GPS_PLATINUM, GPS_UBX, GPS_NMEA, GPS_DISABLED };
|
enum GPS_TYPE { GPS_PLATINUM, GPS_UBX, GPS_NMEA, GPS_DISABLED };
|
||||||
enum RADIO_SETTING { RADIO_TELEMETRY, RADIO_DISABLED };
|
enum RADIO_SETTING { RADIO_TELEMETRY, RADIO_DISABLED };
|
||||||
|
@ -54,5 +54,7 @@
|
|||||||
<file>resources/connected.png</file>
|
<file>resources/connected.png</file>
|
||||||
<file>resources/bttn-oneshot-dwn.png</file>
|
<file>resources/bttn-oneshot-dwn.png</file>
|
||||||
<file>resources/bttn-oneshot-up.png</file>
|
<file>resources/bttn-oneshot-up.png</file>
|
||||||
|
<file>resources/bttn-srxl-down.png</file>
|
||||||
|
<file>resources/bttn-srxl-up.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user