1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-19 09:54:15 +01:00

Summary to not show unknown ESC type fpr FWs, remane legacy ESC to

standard ESC, summary shows "legacy" still for Multis.

Remaining problems appear to be SVG ID related.
This commit is contained in:
Fredrik Larson 2014-08-23 02:00:11 +10:00
parent 18c3f8147a
commit e4a4f35178
9 changed files with 42 additions and 25 deletions

View File

@ -126,7 +126,7 @@ void ConnectionDiagram::setupGraphicsScene()
elementsToShow << "aileron";
break;
case VehicleConfigurationSource::FIXED_WING_AILERON:
elementsToShow << "ail2";
elementsToShow << "aileron-single";
break;
case VehicleConfigurationSource::FIXED_WING_ELEVON:
elementsToShow << "elevon";

View File

@ -47,7 +47,7 @@ bool EscPage::validatePage()
if (ui->rapidESCButton->isChecked()) {
getWizard()->setEscType(SetupWizard::ESC_RAPID);
} else {
getWizard()->setEscType(SetupWizard::ESC_LEGACY);
getWizard()->setEscType(SetupWizard::ESC_STANDARD);
}
return true;

View File

@ -82,11 +82,11 @@ void FixedWingPage::resizeEvent(QResizeEvent *event)
void FixedWingPage::setupFixedWingTypesCombo()
{
ui->typeCombo->addItem(tr("Dual Aileron Servos"), SetupWizard::FIXED_WING_DUAL_AILERON);
m_descriptions << tr("This setup expects a traditional airframe setup using two independent aileron servos on their own channel (not connected by Y adapter), an elevator and a rudder. ");
ui->typeCombo->addItem(tr("Aileron Dual Servos"), SetupWizard::FIXED_WING_DUAL_AILERON);
m_descriptions << tr("This setup expects a traditional airframe using two independent aileron servos on their own channel (not connected by Y adapter) plus an elevator and a rudder. ");
ui->typeCombo->addItem(tr("Single Aileron Servo"), SetupWizard::FIXED_WING_AILERON);
m_descriptions << tr("This setup expects a traditional airframe setup using a single alieron servo or two connected by Y a adapter, an elevator and a rudder. ");
ui->typeCombo->addItem(tr("Aileron Single Servo"), SetupWizard::FIXED_WING_AILERON);
m_descriptions << tr("This setup expects a traditional airframe using a single alieron servo or two servos connected by a Y adapter plus an elevator and a rudder. ");
ui->typeCombo->addItem(tr("Elevon"), SetupWizard::FIXED_WING_ELEVON);
m_descriptions << tr("This setup currently expects a flying-wing setup, an elevon plus rudder setup is not yet supported. Setup should include only two elevons, and should explicitly not include a rudder.");
@ -109,7 +109,7 @@ void FixedWingPage::updateImageAndDescription()
elementId = "aileron";
break;
case SetupWizard::FIXED_WING_AILERON:
elementId = "ail2";
elementId = "aileron-single";
break;
case SetupWizard::FIXED_WING_ELEVON:
elementId = "elevon";

View File

@ -186,7 +186,7 @@ void OutputCalibrationPage::setupVehicle()
case SetupWizard::FIXED_WING_AILERON:
loadSVGFile(FIXEDWING_SVG_FILE);
m_wizardIndexes << 0 << 1 << 2 << 3 << 4 << 2 << 3 << 4 << 2 << 3 << 4 << 2 << 3 << 4;
m_vehicleElementIds << "ail2" << "ail2-frame" << "ail2-motor" << "ail2-ail-left" << "ail2-ail-right" << "ail2-rudder" << "ail2-elevator";
m_vehicleElementIds << "aileron-single" << "ail2-frame" << "ail2-motor" << "ail2-ail-left" << "ail2-ail-right" << "ail2-rudder" << "ail2-elevator";
m_vehicleHighlightElementIndexes << 0 << 1 << 2 << 2 << 2 << 3 << 3 << 3 << 4 << 4 << 4 << 5 << 5 << 5;
m_channelIndex << 0 << 2 << 0 << 0 << 0 << 1 << 1 << 1 << 3 << 3 << 3 << 4 << 4 << 4;

View File

@ -777,14 +777,14 @@
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-height="1080"
id="namedview4099"
showgrid="false"
inkscape:zoom="0.72183815"
inkscape:cx="658.07866"
inkscape:cy="230.01827"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:cy="562.50278"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1"
showborder="true"
@ -2581,6 +2581,7 @@
x="569.97363"
y="1401.7424">6</tspan></text>
</g></g><path
id="path4083"
d="m 394.52466,1520.8041 c 0,-0.554 0.359,-1 0.805,-1 h 56.729 c 0.443,0 0.803,0.446 0.803,1 v 12.684 c 0,0.553 -0.357,1 -0.803,1 h -56.729 c -0.443,0 -0.805,-0.447 -0.805,-1 v -12.684 z"
@ -2698,6 +2699,7 @@
<text
xml:space="preserve"
style="font-size:24px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
@ -2713,6 +2715,7 @@
<text
xml:space="preserve"
style="font-size:28px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
@ -2728,6 +2731,7 @@
<text
xml:space="preserve"
style="font-size:24px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
@ -2743,6 +2747,7 @@
<g
id="g9119"><g
transform="translate(-144.24978,106.06605)"
@ -2765,6 +2770,7 @@
</g></g></g><g
id="aileron-elevator"><g
id="g3893"
@ -2895,7 +2901,7 @@
inkscape:connector-curvature="0"
d="m 386.01238,1048.3013 2.31,-0.3081 c 0.265,1.309 0.717,2.2531 1.354,2.8271 0.637,0.578 1.416,0.8669 2.332,0.8669 1.087,0 2.005,-0.377 2.753,-1.1289 0.749,-0.754 1.122,-1.686 1.122,-2.799 0,-1.0631 -0.348,-1.938 -1.038,-2.625 -0.693,-0.688 -1.575,-1.0331 -2.64599,-1.0331 -0.43801,0 -0.979,0.086 -1.63001,0.2581 l 0.25601,-2.0271 c 0.15399,0.018 0.27899,0.024 0.37299,0.024 0.98401,0 1.87101,-0.257 2.658,-0.771 0.787,-0.5161 1.18001,-1.307 1.18001,-2.374 0,-0.848 -0.28501,-1.548 -0.85701,-2.104 -0.574,-0.556 -1.313,-0.834 -2.223,-0.834 -0.897,0 -1.646,0.282 -2.246,0.849 -0.599,0.563 -0.984,1.41 -1.156,2.541 l -2.30999,-0.411 c 0.28199,-1.549 0.92299,-2.748 1.92499,-3.602 1.00001,-0.852 2.246,-1.275 3.735,-1.275 1.025,0 1.973,0.221 2.836,0.662 0.864,0.438 1.524,1.04 1.983,1.803 0.457,0.762 0.686,1.569 0.686,2.426 0,0.813 -0.219,1.5529 -0.65399,2.221 -0.43601,0.6659 -1.08201,1.197 -1.93701,1.594 1.11,0.256 1.976,0.787 2.591,1.598 0.617,0.808 0.924,1.82 0.924,3.035 0,1.643 -0.598,3.035 -1.795,4.178 -1.199,1.1419 -2.714,1.7129 -4.54499,1.7129 -1.65101,0 -3.022,-0.492 -4.11301,-1.4759 -1.092,-0.986 -1.715,-2.2611 -1.868,-3.828 z"
id="path3977-3-3-9" /></g></g><g
id="ail2"><g
id="aileron-single"><g
transform="translate(-12.266231,444.46505)"
id="aileron-propeller-4"><g
id="g3577-4"
@ -3149,6 +3155,7 @@
x="340"
y="1710.3125" /></text>
<text
xml:space="preserve"
style="font-size:24px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
@ -3162,6 +3169,7 @@
x="339.91922"
y="1709.9094" /></text>
<text
xml:space="preserve"
style="font-size:28px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
@ -3175,6 +3183,7 @@
x="340.15253"
y="1709.0928" /></text>
<text
xml:space="preserve"
style="font-size:24px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
@ -3188,6 +3197,7 @@
x="341.36118"
y="1710.3545" /></text>
<g
id="g9119-8"><g
transform="translate(-144.24978,106.06605)"
@ -3208,6 +3218,7 @@
id="tspan9117-6"
sodipodi:role="line">4</tspan></text>
</g></g></g><g
id="ail2-elevator"><rect
style="fill:url(#linearGradient5658);fill-opacity:1;stroke:#010101;stroke-width:0.69120002;stroke-linecap:round;stroke-linejoin:round"

Before

Width:  |  Height:  |  Size: 260 KiB

After

Width:  |  Height:  |  Size: 260 KiB

View File

@ -312,15 +312,19 @@ QString SetupWizard::getSummaryText()
summary.append("<br>");
summary.append("<b>").append(tr("Speed Controller (ESC) type: ")).append("</b>");
switch (getEscType()) {
case ESC_LEGACY:
summary.append(tr("Legacy ESC (50 Hz)"));
break;
case ESC_RAPID:
summary.append(tr("Rapid ESC (400 Hz)"));
break;
default:
summary.append(tr("Unknown"));
if (getVehicleType() == VEHICLE_FIXEDWING) {
summary.append(tr("Standard ESC (50 Hz)"));
} else {
switch (getEscType()) {
case ESC_STANDARD:
summary.append(tr("Legacy ESC (50 Hz)"));
break;
case ESC_RAPID:
summary.append(tr("Rapid ESC (400 Hz)"));
break;
default:
summary.append(tr("Unknown"));
}
}
if (getVehicleSubType() == MULTI_ROTOR_TRI_Y || getVehicleType() == VEHICLE_FIXEDWING) {

View File

@ -255,7 +255,7 @@ void VehicleConfigurationHelper::applyActuatorConfiguration()
qint16 escFrequence = LEGACY_ESC_FREQUENCE;
switch (m_configSource->getEscType()) {
case VehicleConfigurationSource::ESC_LEGACY:
case VehicleConfigurationSource::ESC_STANDARD:
escFrequence = LEGACY_ESC_FREQUENCE;
break;
case VehicleConfigurationSource::ESC_RAPID:
@ -1553,6 +1553,7 @@ void VehicleConfigurationHelper::setupElevon()
mixerChannelSettings channels[10];
GUIConfigDataUnion guiSettings = getGUIConfigData();
// Motor (Chan 3)
channels[2].type = MIXER_TYPE_MOTOR;
channels[2].throttle1 = 100;
channels[2].throttle2 = 0;
@ -1560,6 +1561,7 @@ void VehicleConfigurationHelper::setupElevon()
channels[2].pitch = 0;
channels[2].yaw = 0;
// Elevon Servo 1 (Chan 1)
channels[0].type = MIXER_TYPE_SERVO;
channels[0].throttle1 = 0;
channels[0].throttle2 = 0;
@ -1567,6 +1569,7 @@ void VehicleConfigurationHelper::setupElevon()
channels[0].pitch = 100;
channels[0].yaw = 0;
// Elevon Servo 1 (Chan 2)
channels[1].type = MIXER_TYPE_SERVO;
channels[1].throttle1 = 0;
channels[1].throttle2 = 0;

View File

@ -106,7 +106,6 @@ private:
void setupQuadCopter();
void setupHexaCopter();
void setupOctoCopter();
void setupVtail();
void setupElevon();
void setupDualAileron();
void setupAileron();

View File

@ -61,7 +61,7 @@ public:
MULTI_ROTOR_HEXA, MULTI_ROTOR_HEXA_H, MULTI_ROTOR_HEXA_X, MULTI_ROTOR_HEXA_COAX_Y, MULTI_ROTOR_OCTO,
MULTI_ROTOR_OCTO_X, MULTI_ROTOR_OCTO_V, MULTI_ROTOR_OCTO_COAX_X, MULTI_ROTOR_OCTO_COAX_PLUS,
FIXED_WING_DUAL_AILERON, FIXED_WING_AILERON, FIXED_WING_ELEVON, HELI_CCPM };
enum ESC_TYPE { ESC_RAPID, ESC_LEGACY, ESC_UNKNOWN };
enum ESC_TYPE { 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_DSMX10, INPUT_DSMX11, INPUT_DSM2, INPUT_UNKNOWN };