mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-05 21:52:10 +01:00
Merge remote-tracking branch 'origin/next' into Brian-PipXtreme-V2
This commit is contained in:
commit
513c014f5a
@ -1389,13 +1389,13 @@ margin:1px;</string>
|
|||||||
<property name="autoFillBackground">
|
<property name="autoFillBackground">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0">
|
<layout class="QVBoxLayout" name="verticalLayout_31" stretch="0">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
<layout class="QVBoxLayout" name="verticalLayout_61">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_31">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_51">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@ -1417,7 +1417,7 @@ margin:1px;</string>
|
|||||||
<widget class="QComboBox" name="groundVehicleType"/>
|
<widget class="QComboBox" name="groundVehicleType"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_3">
|
<spacer name="horizontalSpacer_31">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -1432,7 +1432,7 @@ margin:1px;</string>
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_23">
|
<layout class="QHBoxLayout" name="horizontalLayout_33">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_7">
|
<widget class="QLabel" name="label_7">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@ -1462,9 +1462,9 @@ margin:1px;</string>
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="horizontalLayout_41">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="groupBox_7">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@ -1480,7 +1480,7 @@ margin:1px;</string>
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Output channel asignmets</string>
|
<string>Output channel asignmets</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout_3">
|
<layout class="QFormLayout" name="formLayout_5">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="gvEngineLabel">
|
<widget class="QLabel" name="gvEngineLabel">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@ -1644,11 +1644,11 @@ margin:1px;</string>
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Differential Steering Mix</string>
|
<string>Differential Steering Mix</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_13">
|
<layout class="QVBoxLayout" name="verticalLayout_33">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
<layout class="QHBoxLayout" name="horizontalLayout_30">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_14">
|
<layout class="QVBoxLayout" name="verticalLayout_34">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="differentialSteeringLabel1">
|
<widget class="QLabel" name="differentialSteeringLabel1">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@ -1685,7 +1685,7 @@ margin:1px;</string>
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_15">
|
<layout class="QVBoxLayout" name="verticalLayout_35">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="differentialSteeringLabel2">
|
<widget class="QLabel" name="differentialSteeringLabel2">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@ -1727,7 +1727,7 @@ margin:1px;</string>
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_4">
|
<spacer name="horizontalSpacer_24">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -1750,7 +1750,7 @@ margin:1px;</string>
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Front throttle curve</string>
|
<string>Front throttle curve</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_16">
|
<layout class="QVBoxLayout" name="verticalLayout_36">
|
||||||
<item>
|
<item>
|
||||||
<widget class="MixerCurveWidget" name="groundVehicleThrottle1" native="true">
|
<widget class="MixerCurveWidget" name="groundVehicleThrottle1" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -1807,7 +1807,7 @@ margin:1px;</string>
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Rear throttle curve</string>
|
<string>Rear throttle curve</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_17">
|
<layout class="QVBoxLayout" name="verticalLayout_37">
|
||||||
<item>
|
<item>
|
||||||
<widget class="MixerCurveWidget" name="groundVehicleThrottle2" native="true">
|
<widget class="MixerCurveWidget" name="groundVehicleThrottle2" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -1850,7 +1850,7 @@ margin:1px;</string>
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer_1">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -1863,9 +1863,9 @@ margin:1px;</string>
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
<layout class="QHBoxLayout" name="horizontalLayout_28">
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_11">
|
<spacer name="horizontalSpacer_21">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -119,7 +119,7 @@ ConfigVehicleTypeWidget::ConfigVehicleTypeWidget(QWidget *parent) : ConfigTaskWi
|
|||||||
QStringList airframeTypes;
|
QStringList airframeTypes;
|
||||||
airframeTypes << "Fixed Wing" << "Multirotor" << "Helicopter" << "Ground" << "Custom";
|
airframeTypes << "Fixed Wing" << "Multirotor" << "Helicopter" << "Ground" << "Custom";
|
||||||
m_aircraft->aircraftType->addItems(airframeTypes);
|
m_aircraft->aircraftType->addItems(airframeTypes);
|
||||||
m_aircraft->aircraftType->setCurrentIndex(1);
|
m_aircraft->aircraftType->setCurrentIndex(0); //Set default vehicle to Fixed Wing
|
||||||
|
|
||||||
QStringList fixedWingTypes;
|
QStringList fixedWingTypes;
|
||||||
fixedWingTypes << "Elevator aileron rudder" << "Elevon" << "Vtail";
|
fixedWingTypes << "Elevator aileron rudder" << "Elevon" << "Vtail";
|
||||||
@ -655,7 +655,8 @@ void ConfigVehicleTypeWidget::setupAirframeUI(QString frameType)
|
|||||||
frameType == "HexaCoax" || frameType == "Hexacopter Y6" ||
|
frameType == "HexaCoax" || frameType == "Hexacopter Y6" ||
|
||||||
frameType == "Octo" || frameType == "Octocopter" ||
|
frameType == "Octo" || frameType == "Octocopter" ||
|
||||||
frameType == "OctoV" || frameType == "Octocopter V" ||
|
frameType == "OctoV" || frameType == "Octocopter V" ||
|
||||||
frameType == "OctoCoaxP" || frameType == "Octo Coax +" ) {
|
frameType == "OctoCoaxP" || frameType == "Octo Coax +" ||
|
||||||
|
frameType == "OctoCoaxX" || frameType == "Octo Coax X" ) {
|
||||||
|
|
||||||
//Call multi-rotor setup UI
|
//Call multi-rotor setup UI
|
||||||
setupMultiRotorUI(frameType);
|
setupMultiRotorUI(frameType);
|
||||||
|
@ -3383,6 +3383,10 @@ border-radius: 5;</string>
|
|||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Slowly raise Proportional until you start seeing clear oscillations when you fly.
|
||||||
|
Then lower the value by 5 or so.</string>
|
||||||
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
@ -3433,6 +3437,10 @@ border-radius: 5;</string>
|
|||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Slowly raise Proportional until you start seeing clear oscillations when you fly.
|
||||||
|
Then lower the value by 5 or so.</string>
|
||||||
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>200</number>
|
<number>200</number>
|
||||||
</property>
|
</property>
|
||||||
@ -3484,6 +3492,10 @@ border-radius: 5;</string>
|
|||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Slowly raise Proportional until you start seeing clear oscillations when you fly.
|
||||||
|
Then lower the value by 5 or so.</string>
|
||||||
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
@ -3531,6 +3543,10 @@ border-radius: 5;</string>
|
|||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Slowly raise Proportional until you start seeing clear oscillations when you fly.
|
||||||
|
Then lower the value by 5 or so.</string>
|
||||||
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>200</number>
|
<number>200</number>
|
||||||
</property>
|
</property>
|
||||||
@ -3582,6 +3598,10 @@ border-radius: 5;</string>
|
|||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Slowly raise Proportional until you start seeing clear oscillations when you fly.
|
||||||
|
Then lower the value by 5 or so.</string>
|
||||||
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
@ -3629,6 +3649,10 @@ border-radius: 5;</string>
|
|||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Slowly raise Proportional until you start seeing clear oscillations when you fly.
|
||||||
|
Then lower the value by 5 or so.</string>
|
||||||
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>200</number>
|
<number>200</number>
|
||||||
</property>
|
</property>
|
||||||
@ -3683,6 +3707,10 @@ border-radius: 5;</string>
|
|||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>As a rule of thumb, you can set the Integral at roughly the same
|
||||||
|
value as the Kp.</string>
|
||||||
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
@ -3730,6 +3758,10 @@ border-radius: 5;</string>
|
|||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>As a rule of thumb, you can set the Integral at roughly the same
|
||||||
|
value as the Kp.</string>
|
||||||
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>200</number>
|
<number>200</number>
|
||||||
</property>
|
</property>
|
||||||
@ -3765,6 +3797,10 @@ border-radius: 5;</string>
|
|||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>As a rule of thumb, you can set the Integral at roughly the same
|
||||||
|
value as the Kp.</string>
|
||||||
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
@ -3812,6 +3848,10 @@ border-radius: 5;</string>
|
|||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>As a rule of thumb, you can set the Integral at roughly the same
|
||||||
|
value as the Kp.</string>
|
||||||
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>200</number>
|
<number>200</number>
|
||||||
</property>
|
</property>
|
||||||
@ -3847,6 +3887,10 @@ border-radius: 5;</string>
|
|||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>As a rule of thumb, you can set the Integral at roughly the same
|
||||||
|
value as the Kp.</string>
|
||||||
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
@ -3894,6 +3938,10 @@ border-radius: 5;</string>
|
|||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>As a rule of thumb, you can set the Integral at roughly the same
|
||||||
|
value as the Kp.</string>
|
||||||
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>200</number>
|
<number>200</number>
|
||||||
</property>
|
</property>
|
||||||
@ -11709,6 +11757,10 @@ automatically every 300ms, which will help for fast tuning.</string>
|
|||||||
<pointsize>8</pointsize>
|
<pointsize>8</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Reloads the saved settings into GCS.
|
||||||
|
Useful if you have accidentally changed some settings.</string>
|
||||||
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QPushButton {
|
<string notr="true">QPushButton {
|
||||||
border: 1px outset #999;
|
border: 1px outset #999;
|
||||||
|
@ -531,7 +531,7 @@ void UAVObject::SetGcsAccess(UAVObject::Metadata& metadata, UAVObject::AccessMod
|
|||||||
* \param[in] metadata The metadata object
|
* \param[in] metadata The metadata object
|
||||||
* \return the telemetry acked boolean
|
* \return the telemetry acked boolean
|
||||||
*/
|
*/
|
||||||
uint8_t UAVObject::GetFlightTelemetryAcked(const UAVObject::Metadata& metadata) {
|
quint8 UAVObject::GetFlightTelemetryAcked(const UAVObject::Metadata& metadata) {
|
||||||
return (metadata.flags >> UAVOBJ_TELEMETRY_ACKED_SHIFT) & 1;
|
return (metadata.flags >> UAVOBJ_TELEMETRY_ACKED_SHIFT) & 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -540,7 +540,7 @@ uint8_t UAVObject::GetFlightTelemetryAcked(const UAVObject::Metadata& metadata)
|
|||||||
* \param[in] metadata The metadata object
|
* \param[in] metadata The metadata object
|
||||||
* \param[in] val The telemetry acked boolean
|
* \param[in] val The telemetry acked boolean
|
||||||
*/
|
*/
|
||||||
void UAVObject::SetFlightTelemetryAcked(UAVObject::Metadata& metadata, uint8_t val) {
|
void UAVObject::SetFlightTelemetryAcked(UAVObject::Metadata& metadata, quint8 val) {
|
||||||
SET_BITS(metadata.flags, UAVOBJ_TELEMETRY_ACKED_SHIFT, val, 1);
|
SET_BITS(metadata.flags, UAVOBJ_TELEMETRY_ACKED_SHIFT, val, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -549,7 +549,7 @@ void UAVObject::SetFlightTelemetryAcked(UAVObject::Metadata& metadata, uint8_t v
|
|||||||
* \param[in] metadata The metadata object
|
* \param[in] metadata The metadata object
|
||||||
* \return the telemetry acked boolean
|
* \return the telemetry acked boolean
|
||||||
*/
|
*/
|
||||||
uint8_t UAVObject::GetGcsTelemetryAcked(const UAVObject::Metadata& metadata) {
|
quint8 UAVObject::GetGcsTelemetryAcked(const UAVObject::Metadata& metadata) {
|
||||||
return (metadata.flags >> UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT) & 1;
|
return (metadata.flags >> UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT) & 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,7 +558,7 @@ uint8_t UAVObject::GetGcsTelemetryAcked(const UAVObject::Metadata& metadata) {
|
|||||||
* \param[in] metadata The metadata object
|
* \param[in] metadata The metadata object
|
||||||
* \param[in] val The GCS telemetry acked boolean
|
* \param[in] val The GCS telemetry acked boolean
|
||||||
*/
|
*/
|
||||||
void UAVObject::SetGcsTelemetryAcked(UAVObject::Metadata& metadata, uint8_t val) {
|
void UAVObject::SetGcsTelemetryAcked(UAVObject::Metadata& metadata, quint8 val) {
|
||||||
SET_BITS(metadata.flags, UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT, val, 1);
|
SET_BITS(metadata.flags, UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT, val, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,10 +90,10 @@ public:
|
|||||||
* 6-7 gcsTelemetryUpdateMode Update mode used by the GCS (UAVObjUpdateMode)
|
* 6-7 gcsTelemetryUpdateMode Update mode used by the GCS (UAVObjUpdateMode)
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t flags; /** Defines flags for update and logging modes and whether an update should be ACK'd (bits defined above) */
|
quint8 flags; /** Defines flags for update and logging modes and whether an update should be ACK'd (bits defined above) */
|
||||||
uint16_t flightTelemetryUpdatePeriod; /** Update period used by the telemetry module (only if telemetry mode is PERIODIC) */
|
quint16 flightTelemetryUpdatePeriod; /** Update period used by the telemetry module (only if telemetry mode is PERIODIC) */
|
||||||
uint16_t gcsTelemetryUpdatePeriod; /** Update period used by the GCS (only if telemetry mode is PERIODIC) */
|
quint16 gcsTelemetryUpdatePeriod; /** Update period used by the GCS (only if telemetry mode is PERIODIC) */
|
||||||
uint16_t loggingUpdatePeriod; /** Update period used by the logging module (only if logging mode is PERIODIC) */
|
quint16 loggingUpdatePeriod; /** Update period used by the logging module (only if logging mode is PERIODIC) */
|
||||||
} __attribute__((packed)) Metadata;
|
} __attribute__((packed)) Metadata;
|
||||||
|
|
||||||
|
|
||||||
@ -132,10 +132,10 @@ public:
|
|||||||
static void SetFlightAccess(Metadata& meta, AccessMode mode);
|
static void SetFlightAccess(Metadata& meta, AccessMode mode);
|
||||||
static AccessMode GetGcsAccess(const Metadata& meta);
|
static AccessMode GetGcsAccess(const Metadata& meta);
|
||||||
static void SetGcsAccess(Metadata& meta, AccessMode mode);
|
static void SetGcsAccess(Metadata& meta, AccessMode mode);
|
||||||
static uint8_t GetFlightTelemetryAcked(const Metadata& meta);
|
static quint8 GetFlightTelemetryAcked(const Metadata& meta);
|
||||||
static void SetFlightTelemetryAcked(Metadata& meta, uint8_t val);
|
static void SetFlightTelemetryAcked(Metadata& meta, quint8 val);
|
||||||
static uint8_t GetGcsTelemetryAcked(const Metadata& meta);
|
static quint8 GetGcsTelemetryAcked(const Metadata& meta);
|
||||||
static void SetGcsTelemetryAcked(Metadata& meta, uint8_t val);
|
static void SetGcsTelemetryAcked(Metadata& meta, quint8 val);
|
||||||
static UpdateMode GetFlightTelemetryUpdateMode(const Metadata& meta);
|
static UpdateMode GetFlightTelemetryUpdateMode(const Metadata& meta);
|
||||||
static void SetFlightTelemetryUpdateMode(Metadata& meta, UpdateMode val);
|
static void SetFlightTelemetryUpdateMode(Metadata& meta, UpdateMode val);
|
||||||
static UpdateMode GetGcsTelemetryUpdateMode(const Metadata& meta);
|
static UpdateMode GetGcsTelemetryUpdateMode(const Metadata& meta);
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
ConfigTaskWidget::ConfigTaskWidget(QWidget *parent) : QWidget(parent),isConnected(false),smartsave(NULL),dirty(false),outOfLimitsStyle("background-color: rgb(255, 0, 0);")
|
ConfigTaskWidget::ConfigTaskWidget(QWidget *parent) : QWidget(parent),isConnected(false),smartsave(NULL),dirty(false),outOfLimitsStyle("background-color: rgb(255, 0, 0);"),timeOut(NULL)
|
||||||
{
|
{
|
||||||
pm = ExtensionSystem::PluginManager::instance();
|
pm = ExtensionSystem::PluginManager::instance();
|
||||||
objManager = pm->getObject<UAVObjectManager>();
|
objManager = pm->getObject<UAVObjectManager>();
|
||||||
@ -175,6 +175,10 @@ ConfigTaskWidget::~ConfigTaskWidget()
|
|||||||
if(oTw)
|
if(oTw)
|
||||||
delete oTw;
|
delete oTw;
|
||||||
}
|
}
|
||||||
|
if(timeOut)
|
||||||
|
{
|
||||||
|
delete timeOut;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigTaskWidget::saveObjectToSD(UAVObject *obj)
|
void ConfigTaskWidget::saveObjectToSD(UAVObject *obj)
|
||||||
@ -780,7 +784,7 @@ void ConfigTaskWidget::reloadButtonClicked()
|
|||||||
if(!list)
|
if(!list)
|
||||||
return;
|
return;
|
||||||
ObjectPersistence* objper = dynamic_cast<ObjectPersistence*>( getObjectManager()->getObject(ObjectPersistence::NAME) );
|
ObjectPersistence* objper = dynamic_cast<ObjectPersistence*>( getObjectManager()->getObject(ObjectPersistence::NAME) );
|
||||||
QTimer * timeOut=new QTimer(this);
|
timeOut=new QTimer(this);
|
||||||
QEventLoop * eventLoop=new QEventLoop(this);
|
QEventLoop * eventLoop=new QEventLoop(this);
|
||||||
connect(timeOut, SIGNAL(timeout()),eventLoop,SLOT(quit()));
|
connect(timeOut, SIGNAL(timeout()),eventLoop,SLOT(quit()));
|
||||||
connect(objper, SIGNAL(objectUpdated(UAVObject*)), eventLoop, SLOT(quit()));
|
connect(objper, SIGNAL(objectUpdated(UAVObject*)), eventLoop, SLOT(quit()));
|
||||||
@ -799,13 +803,22 @@ void ConfigTaskWidget::reloadButtonClicked()
|
|||||||
eventLoop->exec();
|
eventLoop->exec();
|
||||||
if(timeOut->isActive())
|
if(timeOut->isActive())
|
||||||
{
|
{
|
||||||
|
oTw->object->requestUpdate();
|
||||||
setWidgetFromField(oTw->widget,oTw->field,oTw->index,oTw->scale,oTw->isLimited);
|
setWidgetFromField(oTw->widget,oTw->field,oTw->index,oTw->scale,oTw->isLimited);
|
||||||
}
|
}
|
||||||
timeOut->stop();
|
timeOut->stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete eventLoop;
|
if(eventLoop)
|
||||||
delete timeOut;
|
{
|
||||||
|
delete eventLoop;
|
||||||
|
eventLoop=NULL;
|
||||||
|
}
|
||||||
|
if(timeOut)
|
||||||
|
{
|
||||||
|
delete timeOut;
|
||||||
|
timeOut=NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -164,6 +164,7 @@ private:
|
|||||||
void disconnectWidgetUpdatesToSlot(QWidget *widget, const char *function);
|
void disconnectWidgetUpdatesToSlot(QWidget *widget, const char *function);
|
||||||
void loadWidgetLimits(QWidget *widget, UAVObjectField *field, int index, bool hasLimits, double sclale);
|
void loadWidgetLimits(QWidget *widget, UAVObjectField *field, int index, bool hasLimits, double sclale);
|
||||||
QString outOfLimitsStyle;
|
QString outOfLimitsStyle;
|
||||||
|
QTimer * timeOut;
|
||||||
protected slots:
|
protected slots:
|
||||||
virtual void disableObjUpdates();
|
virtual void disableObjUpdates();
|
||||||
virtual void enableObjUpdates();
|
virtual void enableObjUpdates();
|
||||||
|
@ -404,10 +404,12 @@ void deviceWidget::uploadFirmware()
|
|||||||
status("Starting firmware upload", STATUSICON_RUNNING);
|
status("Starting firmware upload", STATUSICON_RUNNING);
|
||||||
// We don't know which device was used previously, so we
|
// We don't know which device was used previously, so we
|
||||||
// are cautious and reenter DFU for this deviceID:
|
// are cautious and reenter DFU for this deviceID:
|
||||||
|
emit uploadStarted();
|
||||||
if(!m_dfu->enterDFU(deviceID))
|
if(!m_dfu->enterDFU(deviceID))
|
||||||
{
|
{
|
||||||
status("Error:Could not enter DFU mode", STATUSICON_FAIL);
|
status("Error:Could not enter DFU mode", STATUSICON_FAIL);
|
||||||
myDevice->updateButton->setEnabled(true);
|
myDevice->updateButton->setEnabled(true);
|
||||||
|
emit uploadEnded(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
OP_DFU::Status ret=m_dfu->StatusRequest();
|
OP_DFU::Status ret=m_dfu->StatusRequest();
|
||||||
@ -421,6 +423,7 @@ void deviceWidget::uploadFirmware()
|
|||||||
if(!retstatus ) {
|
if(!retstatus ) {
|
||||||
status("Could not start upload", STATUSICON_FAIL);
|
status("Could not start upload", STATUSICON_FAIL);
|
||||||
myDevice->updateButton->setEnabled(true);
|
myDevice->updateButton->setEnabled(true);
|
||||||
|
emit uploadEnded(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
status("Uploading, please wait...", STATUSICON_RUNNING);
|
status("Uploading, please wait...", STATUSICON_RUNNING);
|
||||||
@ -480,6 +483,7 @@ void deviceWidget::uploadFinished(OP_DFU::Status retstatus)
|
|||||||
disconnect(m_dfu, SIGNAL(operationProgress(QString)), this, SLOT(dfuStatus(QString)));
|
disconnect(m_dfu, SIGNAL(operationProgress(QString)), this, SLOT(dfuStatus(QString)));
|
||||||
if(retstatus != OP_DFU::Last_operation_Success) {
|
if(retstatus != OP_DFU::Last_operation_Success) {
|
||||||
status(QString("Upload failed with code: ") + m_dfu->StatusToString(retstatus).toLatin1().data(), STATUSICON_FAIL);
|
status(QString("Upload failed with code: ") + m_dfu->StatusToString(retstatus).toLatin1().data(), STATUSICON_FAIL);
|
||||||
|
emit uploadEnded(false);
|
||||||
return;
|
return;
|
||||||
} else
|
} else
|
||||||
if (!descriptionArray.isEmpty()) {
|
if (!descriptionArray.isEmpty()) {
|
||||||
@ -489,6 +493,7 @@ void deviceWidget::uploadFinished(OP_DFU::Status retstatus)
|
|||||||
retstatus = m_dfu->UploadDescription(descriptionArray);
|
retstatus = m_dfu->UploadDescription(descriptionArray);
|
||||||
if( retstatus != OP_DFU::Last_operation_Success) {
|
if( retstatus != OP_DFU::Last_operation_Success) {
|
||||||
status(QString("Upload failed with code: ") + m_dfu->StatusToString(retstatus).toLatin1().data(), STATUSICON_FAIL);
|
status(QString("Upload failed with code: ") + m_dfu->StatusToString(retstatus).toLatin1().data(), STATUSICON_FAIL);
|
||||||
|
emit uploadEnded(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -499,10 +504,12 @@ void deviceWidget::uploadFinished(OP_DFU::Status retstatus)
|
|||||||
retstatus = m_dfu->UploadDescription(myDevice->description->text());
|
retstatus = m_dfu->UploadDescription(myDevice->description->text());
|
||||||
if( retstatus != OP_DFU::Last_operation_Success) {
|
if( retstatus != OP_DFU::Last_operation_Success) {
|
||||||
status(QString("Upload failed with code: ") + m_dfu->StatusToString(retstatus).toLatin1().data(), STATUSICON_FAIL);
|
status(QString("Upload failed with code: ") + m_dfu->StatusToString(retstatus).toLatin1().data(), STATUSICON_FAIL);
|
||||||
|
emit uploadEnded(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
populate();
|
populate();
|
||||||
|
emit uploadEnded(true);
|
||||||
status("Upload successful", STATUSICON_OK);
|
status("Upload successful", STATUSICON_OK);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,8 @@ private:
|
|||||||
bool populateLoadedStructuredDescription(QByteArray arr);
|
bool populateLoadedStructuredDescription(QByteArray arr);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void uploadStarted();
|
||||||
|
void uploadEnded(bool success);
|
||||||
public slots:
|
public slots:
|
||||||
void uploadFirmware();
|
void uploadFirmware();
|
||||||
void loadFirmware();
|
void loadFirmware();
|
||||||
|
@ -116,6 +116,12 @@ QString UploaderGadgetWidget::getPortDevice(const QString &friendName)
|
|||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UploaderGadgetWidget::connectSignalSlot(QWidget *widget)
|
||||||
|
{
|
||||||
|
connect(qobject_cast<deviceWidget *>(widget),SIGNAL(uploadStarted()),this,SLOT(uploadStarted()));
|
||||||
|
connect(qobject_cast<deviceWidget *>(widget),SIGNAL(uploadEnded(bool)),this,SLOT(uploadEnded(bool)));
|
||||||
|
}
|
||||||
void UploaderGadgetWidget::onPhisicalHWConnect()
|
void UploaderGadgetWidget::onPhisicalHWConnect()
|
||||||
{
|
{
|
||||||
m_config->bootButton->setEnabled(false);
|
m_config->bootButton->setEnabled(false);
|
||||||
@ -305,6 +311,7 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success)
|
|||||||
}
|
}
|
||||||
for(int i=0;i<dfu->numberOfDevices;i++) {
|
for(int i=0;i<dfu->numberOfDevices;i++) {
|
||||||
deviceWidget* dw = new deviceWidget(this);
|
deviceWidget* dw = new deviceWidget(this);
|
||||||
|
connectSignalSlot(dw);
|
||||||
dw->setDeviceID(i);
|
dw->setDeviceID(i);
|
||||||
dw->setDfu(dfu);
|
dw->setDfu(dfu);
|
||||||
dw->populate();
|
dw->populate();
|
||||||
@ -540,6 +547,7 @@ void UploaderGadgetWidget::systemRescue()
|
|||||||
}
|
}
|
||||||
for(int i=0;i<dfu->numberOfDevices;i++) {
|
for(int i=0;i<dfu->numberOfDevices;i++) {
|
||||||
deviceWidget* dw = new deviceWidget(this);
|
deviceWidget* dw = new deviceWidget(this);
|
||||||
|
connectSignalSlot(dw);
|
||||||
dw->setDeviceID(i);
|
dw->setDeviceID(i);
|
||||||
dw->setDfu(dfu);
|
dw->setDfu(dfu);
|
||||||
dw->populate();
|
dw->populate();
|
||||||
@ -567,6 +575,19 @@ void UploaderGadgetWidget::cancel()
|
|||||||
m_eventloop.exit();
|
m_eventloop.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UploaderGadgetWidget::uploadStarted()
|
||||||
|
{
|
||||||
|
m_config->bootButton->setEnabled(false);
|
||||||
|
m_config->safeBootButton->setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void UploaderGadgetWidget::uploadEnded(bool succeed)
|
||||||
|
{
|
||||||
|
Q_UNUSED(succeed);
|
||||||
|
m_config->bootButton->setEnabled(true);
|
||||||
|
m_config->safeBootButton->setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Update log entry
|
Update log entry
|
||||||
*/
|
*/
|
||||||
|
@ -88,6 +88,7 @@ private:
|
|||||||
QLineEdit* openFileNameLE;
|
QLineEdit* openFileNameLE;
|
||||||
QEventLoop m_eventloop;
|
QEventLoop m_eventloop;
|
||||||
QErrorMessage * msg;
|
QErrorMessage * msg;
|
||||||
|
void connectSignalSlot(QWidget * widget);
|
||||||
private slots:
|
private slots:
|
||||||
void onPhisicalHWConnect();
|
void onPhisicalHWConnect();
|
||||||
void versionMatchCheck();
|
void versionMatchCheck();
|
||||||
@ -102,6 +103,8 @@ private slots:
|
|||||||
void getSerialPorts();
|
void getSerialPorts();
|
||||||
void perform();
|
void perform();
|
||||||
void cancel();
|
void cancel();
|
||||||
|
void uploadStarted();
|
||||||
|
void uploadEnded(bool succeed);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user