1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

OP-1491 HQuad_mixing_values First commit : add QuadH artwork, config tab

This commit is contained in:
Laurent Lalanne 2014-09-15 22:25:07 +02:00
parent 857924ff6b
commit 48ce38370c
4 changed files with 1595 additions and 10 deletions

View File

@ -262,6 +262,7 @@ FrameType_t GetCurrentFrameType()
switch ((SystemSettingsAirframeTypeOptions)airframe_type) {
case SYSTEMSETTINGS_AIRFRAMETYPE_QUADX:
case SYSTEMSETTINGS_AIRFRAMETYPE_QUADP:
case SYSTEMSETTINGS_AIRFRAMETYPE_QUADH:
case SYSTEMSETTINGS_AIRFRAMETYPE_HEXA:
case SYSTEMSETTINGS_AIRFRAMETYPE_OCTO:
case SYSTEMSETTINGS_AIRFRAMETYPE_OCTOX:

View File

@ -176,6 +176,12 @@ void ConfigMultiRotorWidget::setupUI(QString frameType)
m_aircraft->mrRollMixLevel->setValue(50);
m_aircraft->mrPitchMixLevel->setValue(50);
setYawMixLevel(50);
} else if (frameType == "QuadH" || frameType == "Quad H") {
setComboCurrentIndex(m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Quad H"));
m_aircraft->mrRollMixLevel->setValue(50);
m_aircraft->mrPitchMixLevel->setValue(70);
setYawMixLevel(50);
} else if (frameType == "QuadP" || frameType == "Quad +") {
setComboCurrentIndex(m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Quad +"));
@ -271,6 +277,8 @@ void ConfigMultiRotorWidget::setupEnabledControls(QString frameType)
enableComboBoxes(this, CHANNELBOXNAME, 4, true);
} else if (frameType == "QuadP" || frameType == "Quad +") {
enableComboBoxes(this, CHANNELBOXNAME, 4, true);
} else if (frameType == "QuadH" || frameType == "Quad H") {
enableComboBoxes(this, CHANNELBOXNAME, 4, true);
} else if (frameType == "Hexa" || frameType == "Hexacopter") {
enableComboBoxes(this, CHANNELBOXNAME, 6, true);
} else if (frameType == "HexaX" || frameType == "Hexacopter X") {
@ -470,6 +478,9 @@ QString ConfigMultiRotorWidget::updateConfigObjectsFromWidgets()
} else if (m_aircraft->multirotorFrameType->currentText() == "Quad X") {
airframeType = "QuadX";
setupQuad(false);
} else if (m_aircraft->multirotorFrameType->currentText() == "Quad H") {
airframeType = "QuadH";
setupQuad(false);
} else if (m_aircraft->multirotorFrameType->currentText() == "Hexacopter") {
airframeType = "Hexa";
setupHexa(true);
@ -743,6 +754,8 @@ void ConfigMultiRotorWidget::updateAirframe(QString frameType)
elementId = "quad-x";
} else if (frameType == "QuadP" || frameType == "Quad +") {
elementId = "quad-plus";
} else if (frameType == "QuadH" || frameType == "Quad H") {
elementId = "quad-H";
} else if (frameType == "Hexa" || frameType == "Hexacopter") {
elementId = "quad-hexa";
} else if (frameType == "HexaX" || frameType == "Hexacopter X") {
@ -874,7 +887,7 @@ bool ConfigMultiRotorWidget::setupQuad(bool pLayout)
setupMotors(motorList);
// Now, setup the mixer:
// Motor 1 to 4, X Layout:
// Motor 1 to 4, X Layout and Hlayout
// pitch roll yaw
// {0.5 ,0.5 ,-0.5 //Front left motor (CW)
// {0.5 ,-0.5 ,0.5 //Front right motor(CCW)

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 898 KiB

After

Width:  |  Height:  |  Size: 997 KiB

View File

@ -1,7 +1,7 @@
<xml>
<object name="SystemSettings" singleinstance="true" settings="true" category="System">
<description>Select airframe type. Currently used by @ref ActuatorModule to choose mixing from @ref ActuatorDesired to @ref ActuatorCommand</description>
<field name="AirframeType" units="" type="enum" elements="1" options="FixedWing,FixedWingElevon,FixedWingVtail,VTOL,HeliCP,QuadX,QuadP,Hexa,Octo,Custom,HexaX,HexaH,OctoV,OctoCoaxP,OctoCoaxX,OctoX,HexaCoax,Tri,GroundVehicleCar,GroundVehicleDifferential,GroundVehicleMotorcycle" defaultvalue="QuadX"/>
<field name="AirframeType" units="" type="enum" elements="1" options="FixedWing,FixedWingElevon,FixedWingVtail,VTOL,HeliCP,QuadX,QuadP,QuadH,Hexa,Octo,Custom,HexaX,HexaH,OctoV,OctoCoaxP,OctoCoaxX,OctoX,HexaCoax,Tri,GroundVehicleCar,GroundVehicleDifferential,GroundVehicleMotorcycle" defaultvalue="QuadX"/>
<field name="ThrustControl" units="" type="enum" elements="1" options="Throttle,Collective,None" defaultvalue="Throttle" />
<!-- Which way the vehicle controls its thrust. Can be through
"Throttle" (quadcopter, simple brushless planes,