File tree Expand file tree Collapse file tree 4 files changed +21
-3
lines changed Expand file tree Collapse file tree 4 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ SetupPage {
107
107
}
108
108
}
109
109
110
+ // Left Column
110
111
ColumnLayout {
111
112
spacing: ScreenTools .defaultFontPixelHeight
112
113
implicitWidth: _leftColumnWidth
@@ -396,12 +397,24 @@ SetupPage {
396
397
}
397
398
}
398
399
}
399
-
400
400
} // Column
401
-
402
401
} // Column
403
402
} // Rectangle
404
- }
403
+
404
+ // TODO: add ESC Settings section
405
+ QGCLabel {
406
+ text: qsTr (" ESC Settings" )
407
+ font .pointSize : ScreenTools .mediumFontPointSize
408
+ }
409
+
410
+ // Rectangle {
411
+ // implicitWidth: _leftColumnWidth
412
+ // implicitHeight: actuatorTesting.height + (_margins * 2)
413
+ // color:
414
+ // }
415
+
416
+
417
+ } // Column
405
418
406
419
// Right column
407
420
Column {
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ QString Config::typeToLabel() const
20
20
case Type::set3DModeOff: return QCoreApplication::translate (" ActuatorAction" , " 3D mode: Off" );
21
21
case Type::setSpinDirection1: return QCoreApplication::translate (" ActuatorAction" , " Set Spin Direction 1" );
22
22
case Type::setSpinDirection2: return QCoreApplication::translate (" ActuatorAction" , " Set Spin Direction 2" );
23
+ case Type::requestEscSettings: return QCoreApplication::translate (" ActuatorAction" , " Request ESC Settings" );
23
24
}
24
25
return " " ;
25
26
}
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ struct Config {
25
25
set3DModeOff = ACTUATOR_CONFIGURATION_3D_MODE_OFF, // /< motors: disable 3D mode (reversible)
26
26
setSpinDirection1 = ACTUATOR_CONFIGURATION_SPIN_DIRECTION1, // /< motors: set spin direction 1
27
27
setSpinDirection2 = ACTUATOR_CONFIGURATION_SPIN_DIRECTION2, // /< motors: set spin direction 2
28
+ requestEscSettings = 6 , // TODO: add to mavlink spec
28
29
};
29
30
30
31
QString typeToLabel () const ;
Original file line number Diff line number Diff line change @@ -451,6 +451,7 @@ bool Actuators::parseJson(const QJsonDocument &json)
451
451
for (const auto & actionName : supportedActionsObj.keys ()) {
452
452
QJsonObject actionObj = supportedActionsObj.value (actionName).toObject ();
453
453
ActuatorActions::Config action{};
454
+ qDebug () << " Available Action: " << actionName;
454
455
bool knownAction = true ;
455
456
if (actionName == " beep" ) {
456
457
action.type = ActuatorActions::Config::Type::beep;
@@ -462,6 +463,8 @@ bool Actuators::parseJson(const QJsonDocument &json)
462
463
action.type = ActuatorActions::Config::Type::setSpinDirection1;
463
464
} else if (actionName == " set-spin-direction2" ) {
464
465
action.type = ActuatorActions::Config::Type::setSpinDirection2;
466
+ } else if (actionName == " request-esc-settings" ) {
467
+ action.type = ActuatorActions::Config::Type::requestEscSettings;
465
468
} else {
466
469
knownAction = false ;
467
470
qCWarning (ActuatorsConfigLog) << " Unknown 'supported-actions':" << actionName;
You can’t perform that action at this time.
0 commit comments