Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
d32ab81d
Commit
d32ab81d
authored
May 09, 2017
by
Don Gagne
Committed by
GitHub
May 09, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4316 from dennisss/cf2
CF2 Support
parents
3d60c734
06d0a4af
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
484 additions
and
4 deletions
+484
-4
qgroundcontrol.pro
qgroundcontrol.pro
+4
-0
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
SyslinkComponent.cc
src/AutoPilotPlugins/Common/SyslinkComponent.cc
+64
-0
SyslinkComponent.h
src/AutoPilotPlugins/Common/SyslinkComponent.h
+40
-0
SyslinkComponent.qml
src/AutoPilotPlugins/Common/SyslinkComponent.qml
+140
-0
SyslinkComponentController.cc
src/AutoPilotPlugins/Common/SyslinkComponentController.cc
+137
-0
SyslinkComponentController.h
src/AutoPilotPlugins/Common/SyslinkComponentController.h
+66
-0
PX4AutoPilotPlugin.cc
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
+7
-0
PX4AutoPilotPlugin.h
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.h
+2
-2
QGCApplication.cc
src/QGCApplication.cc
+2
-0
Bootloader.h
src/VehicleSetup/Bootloader.h
+1
-1
FirmwareUpgradeController.cc
src/VehicleSetup/FirmwareUpgradeController.cc
+16
-0
FirmwareUpgradeController.h
src/VehicleSetup/FirmwareUpgradeController.h
+1
-0
QGCSerialPortInfo.cc
src/comm/QGCSerialPortInfo.cc
+0
-1
USBBoardInfo.json
src/comm/USBBoardInfo.json
+3
-0
No files found.
qgroundcontrol.pro
View file @
d32ab81d
...
...
@@ -806,6 +806,8 @@ HEADERS+= \
src/AutoPilotPlugins/Common/MixersComponent.h \
src/AutoPilotPlugins/Common/MotorComponent.h \
src/AutoPilotPlugins/Common/RadioComponentController.h \
src/AutoPilotPlugins/Common/SyslinkComponent.h \
src/AutoPilotPlugins/Common/SyslinkComponentController.h \
src/AutoPilotPlugins/Generic/GenericAutoPilotPlugin.h \
src/FirmwarePlugin/CameraMetaData.h \
src/FirmwarePlugin/FirmwarePlugin.h \
...
...
@@ -829,6 +831,8 @@ SOURCES += \
src/AutoPilotPlugins/Common/MixersComponent.cc \
src/AutoPilotPlugins/Common/MotorComponent.cc \
src/AutoPilotPlugins/Common/RadioComponentController.cc \
src/AutoPilotPlugins/Common/SyslinkComponent.cc \
src/AutoPilotPlugins/Common/SyslinkComponentController.cc \
src/AutoPilotPlugins/Generic/GenericAutoPilotPlugin.cc \
src/FirmwarePlugin/CameraMetaData.cc \
src/FirmwarePlugin/FirmwarePlugin.cc \
...
...
qgroundcontrol.qrc
View file @
d32ab81d
...
...
@@ -24,6 +24,7 @@
<file alias="DebugWindow.qml">src/ui/preferences/DebugWindow.qml</file>
<file alias="ESP8266Component.qml">src/AutoPilotPlugins/Common/ESP8266Component.qml</file>
<file alias="ESP8266ComponentSummary.qml">src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml</file>
<file alias="SyslinkComponent.qml">src/AutoPilotPlugins/Common/SyslinkComponent.qml</file>
<file alias="FirmwareUpgrade.qml">src/VehicleSetup/FirmwareUpgrade.qml</file>
<file alias="FlightDisplayViewDummy.qml">src/FlightDisplay/FlightDisplayViewDummy.qml</file>
<file alias="FlightDisplayViewUVC.qml">src/FlightDisplay/FlightDisplayViewUVC.qml</file>
...
...
src/AutoPilotPlugins/Common/SyslinkComponent.cc
0 → 100644
View file @
d32ab81d
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#include "SyslinkComponent.h"
#include "AutoPilotPlugin.h"
SyslinkComponent
::
SyslinkComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
)
:
VehicleComponent
(
vehicle
,
autopilot
,
parent
)
,
_name
(
tr
(
"Syslink"
))
{
}
QString
SyslinkComponent
::
name
(
void
)
const
{
return
_name
;
}
QString
SyslinkComponent
::
description
(
void
)
const
{
return
tr
(
"The Syslink Component is used to setup the radio connection on Crazyflies."
);
}
QString
SyslinkComponent
::
iconResource
(
void
)
const
{
return
"/qmlimages/wifi.svg"
;
}
bool
SyslinkComponent
::
requiresSetup
(
void
)
const
{
return
false
;
}
bool
SyslinkComponent
::
setupComplete
(
void
)
const
{
return
true
;
}
QStringList
SyslinkComponent
::
setupCompleteChangedTriggerList
(
void
)
const
{
return
QStringList
();
}
QUrl
SyslinkComponent
::
setupSource
(
void
)
const
{
return
QUrl
::
fromUserInput
(
"qrc:/qml/SyslinkComponent.qml"
);
}
QUrl
SyslinkComponent
::
summaryQmlSource
(
void
)
const
{
return
QUrl
();
}
QString
SyslinkComponent
::
prerequisiteSetup
(
void
)
const
{
return
QString
();
}
src/AutoPilotPlugins/Common/SyslinkComponent.h
0 → 100644
View file @
d32ab81d
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#ifndef SyslinkComponent_H
#define SyslinkComponent_H
#include "VehicleComponent.h"
class
SyslinkComponent
:
public
VehicleComponent
{
Q_OBJECT
public:
SyslinkComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
=
NULL
);
// Virtuals from VehicleComponent
QStringList
setupCompleteChangedTriggerList
()
const
;
// Virtuals from VehicleComponent
QString
name
()
const
;
QString
description
()
const
;
QString
iconResource
()
const
;
bool
requiresSetup
()
const
;
bool
setupComplete
()
const
;
QUrl
setupSource
()
const
;
QUrl
summaryQmlSource
()
const
;
QString
prerequisiteSetup
()
const
;
private:
const
QString
_name
;
QVariantList
_summaryItems
;
};
#endif
src/AutoPilotPlugins/Common/SyslinkComponent.qml
0 → 100644
View file @
d32ab81d
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import
QtQuick
2.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Dialogs
1.2
import
QtQuick
.
Layouts
1.2
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactControls
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controllers
1.0
SetupPage
{
id
:
syslinkPage
pageComponent
:
pageComponent
Component
{
id
:
pageComponent
Column
{
id
:
innerColumn
width
:
availableWidth
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
property
int
textEditWidth
:
ScreenTools
.
defaultFontPixelWidth
*
12
SyslinkComponentController
{
id
:
controller
factPanel
:
syslinkPage
.
viewPanel
}
QGCLabel
{
text
:
qsTr
(
"
Radio Settings
"
)
font.family
:
ScreenTools
.
demiboldFontFamily
}
Rectangle
{
width
:
parent
.
width
height
:
radioGrid
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
qgcPal
.
windowShade
GridLayout
{
id
:
radioGrid
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
columns
:
2
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
text
:
qsTr
(
"
Channel
"
)
}
QGCTextField
{
id
:
channelField
width
:
textEditWidth
text
:
controller
.
radioChannel
validator
:
IntValidator
{
bottom
:
0
;
top
:
125
;}
inputMethodHints
:
Qt
.
ImhDigitsOnly
onEditingFinished
:
{
controller
.
radioChannel
=
text
}
}
QGCLabel
{
id
:
channelHelp
Layout.columnSpan
:
radioGrid
.
columns
Layout.fillWidth
:
true
font.pointSize
:
ScreenTools
.
smallFontPointSize
wrapMode
:
Text
.
WordWrap
text
:
"
Channel can be between 0 and 125
"
}
QGCLabel
{
id
:
addressLabel
text
:
qsTr
(
"
Address
"
)
}
QGCTextField
{
id
:
addressField
width
:
textEditWidth
text
:
controller
.
radioAddress
maximumLength
:
10
validator
:
RegExpValidator
{
regExp
:
/^
[
0-9A-Fa-f
]
*$/
}
onEditingFinished
:
{
controller
.
radioAddress
=
text
}
}
QGCLabel
{
id
:
addressHelp
Layout.columnSpan
:
radioGrid
.
columns
Layout.fillWidth
:
true
font.pointSize
:
ScreenTools
.
smallFontPointSize
wrapMode
:
Text
.
WordWrap
text
:
"
Address in hex. Default is E7E7E7E7E7.
"
}
QGCLabel
{
id
:
rateLabel
text
:
qsTr
(
"
Data Rate
"
)
}
QGCComboBox
{
id
:
rateField
Layout.fillWidth
:
true
model
:
controller
.
radioRates
currentIndex
:
controller
.
radioRate
onActivated
:
{
controller
.
radioRate
=
index
}
}
QGCButton
{
text
:
"
Restore Defaults
"
width
:
textEditWidth
onClicked
:
{
controller
.
resetDefaults
()
}
}
}
// Grid
}
// Rectangle - Radio Settings
}
}
}
src/AutoPilotPlugins/Common/SyslinkComponentController.cc
0 → 100644
View file @
d32ab81d
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#include "SyslinkComponentController.h"
#include "QGCApplication.h"
#include "UAS.h"
#include "ParameterManager.h"
#include <QHostAddress>
#include <QtEndian>
QGC_LOGGING_CATEGORY
(
SyslinkComponentControllerLog
,
"SyslinkComponentControllerLog"
)
//-----------------------------------------------------------------------------
SyslinkComponentController
::
SyslinkComponentController
()
{
_dataRates
.
append
(
"750Kb/s"
);
_dataRates
.
append
(
"1Mb/s"
);
_dataRates
.
append
(
"2Mb/s"
);
Fact
*
chan
=
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_CHAN"
);
connect
(
chan
,
&
Fact
::
valueChanged
,
this
,
&
SyslinkComponentController
::
_channelChanged
);
Fact
*
rate
=
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_RATE"
);
connect
(
rate
,
&
Fact
::
valueChanged
,
this
,
&
SyslinkComponentController
::
_rateChanged
);
Fact
*
addr1
=
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_ADDR1"
);
connect
(
addr1
,
&
Fact
::
valueChanged
,
this
,
&
SyslinkComponentController
::
_addressChanged
);
Fact
*
addr2
=
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_ADDR2"
);
connect
(
addr2
,
&
Fact
::
valueChanged
,
this
,
&
SyslinkComponentController
::
_addressChanged
);
}
//-----------------------------------------------------------------------------
SyslinkComponentController
::~
SyslinkComponentController
()
{
}
//-----------------------------------------------------------------------------
int
SyslinkComponentController
::
radioChannel
()
{
return
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_CHAN"
)
->
rawValue
().
toUInt
();
}
//-----------------------------------------------------------------------------
void
SyslinkComponentController
::
setRadioChannel
(
int
num
)
{
Fact
*
f
=
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_CHAN"
);
f
->
setRawValue
(
QVariant
(
num
));
}
//-----------------------------------------------------------------------------
QString
SyslinkComponentController
::
radioAddress
()
{
uint32_t
val_uh
=
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_ADDR1"
)
->
rawValue
().
toUInt
();
uint32_t
val_lh
=
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_ADDR2"
)
->
rawValue
().
toUInt
();
uint64_t
val
=
(((
uint64_t
)
val_uh
)
<<
32
)
|
((
uint64_t
)
val_lh
);
return
QString
().
number
(
val
,
16
);
}
//-----------------------------------------------------------------------------
void
SyslinkComponentController
::
setRadioAddress
(
QString
str
)
{
Fact
*
uh
=
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_ADDR1"
);
Fact
*
lh
=
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_ADDR2"
);
uint64_t
val
=
str
.
toULongLong
(
0
,
16
);
uint32_t
val_uh
=
val
>>
32
;
uint32_t
val_lh
=
val
&
0xFFFFFFFF
;
uh
->
setRawValue
(
QVariant
(
val_uh
));
lh
->
setRawValue
(
QVariant
(
val_lh
));
}
//-----------------------------------------------------------------------------
int
SyslinkComponentController
::
radioRate
()
{
return
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_RATE"
)
->
rawValue
().
toInt
();
}
//-----------------------------------------------------------------------------
void
SyslinkComponentController
::
setRadioRate
(
int
idx
)
{
if
(
idx
>=
0
&&
idx
<=
2
&&
idx
!=
radioRate
())
{
Fact
*
r
=
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_RATE"
);
r
->
setRawValue
(
idx
);
}
}
//-----------------------------------------------------------------------------
void
SyslinkComponentController
::
resetDefaults
()
{
Fact
*
chan
=
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_CHAN"
);
Fact
*
rate
=
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_RATE"
);
Fact
*
addr1
=
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_ADDR1"
);
Fact
*
addr2
=
getParameterFact
(
_vehicle
->
id
(),
"SLNK_RADIO_ADDR2"
);
chan
->
setRawValue
(
chan
->
rawDefaultValue
());
rate
->
setRawValue
(
rate
->
rawDefaultValue
());
addr1
->
setRawValue
(
addr1
->
rawDefaultValue
());
addr2
->
setRawValue
(
addr2
->
rawDefaultValue
());
}
//-----------------------------------------------------------------------------
void
SyslinkComponentController
::
_channelChanged
(
QVariant
)
{
emit
radioChannelChanged
();
}
//-----------------------------------------------------------------------------
void
SyslinkComponentController
::
_addressChanged
(
QVariant
)
{
emit
radioAddressChanged
();
}
//-----------------------------------------------------------------------------
void
SyslinkComponentController
::
_rateChanged
(
QVariant
)
{
emit
radioRateChanged
();
}
src/AutoPilotPlugins/Common/SyslinkComponentController.h
0 → 100644
View file @
d32ab81d
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#ifndef SyslinkComponentController_H
#define SyslinkComponentController_H
#include "FactPanelController.h"
#include "UASInterface.h"
#include "QGCLoggingCategory.h"
#include "AutoPilotPlugin.h"
Q_DECLARE_LOGGING_CATEGORY
(
SyslinkComponentControllerLog
)
namespace
Ui
{
class
SyslinkComponentController
;
}
class
SyslinkComponentController
:
public
FactPanelController
{
Q_OBJECT
public:
SyslinkComponentController
();
~
SyslinkComponentController
();
Q_PROPERTY
(
int
radioChannel
READ
radioChannel
WRITE
setRadioChannel
NOTIFY
radioChannelChanged
)
Q_PROPERTY
(
QString
radioAddress
READ
radioAddress
WRITE
setRadioAddress
NOTIFY
radioAddressChanged
)
Q_PROPERTY
(
int
radioRate
READ
radioRate
WRITE
setRadioRate
NOTIFY
radioRateChanged
)
Q_PROPERTY
(
QStringList
radioRates
READ
radioRates
CONSTANT
)
Q_PROPERTY
(
Vehicle
*
vehicle
READ
vehicle
CONSTANT
)
Q_INVOKABLE
void
resetDefaults
();
int
radioChannel
();
QString
radioAddress
();
int
radioRate
();
QStringList
radioRates
()
{
return
_dataRates
;
}
Vehicle
*
vehicle
()
{
return
_vehicle
;
}
void
setRadioChannel
(
int
num
);
void
setRadioAddress
(
QString
str
);
void
setRadioRate
(
int
idx
);
signals:
void
radioChannelChanged
();
void
radioAddressChanged
();
void
radioRateChanged
();
private
slots
:
void
_channelChanged
(
QVariant
value
);
void
_addressChanged
(
QVariant
value
);
void
_rateChanged
(
QVariant
value
);
private:
QStringList
_dataRates
;
};
#endif // SyslinkComponentController_H
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
View file @
d32ab81d
...
...
@@ -40,6 +40,7 @@ PX4AutoPilotPlugin::PX4AutoPilotPlugin(Vehicle* vehicle, QObject* parent)
,
_motorComponent
(
NULL
)
,
_tuningComponent
(
NULL
)
,
_mixersComponent
(
NULL
)
,
_syslinkComponent
(
NULL
)
{
if
(
!
vehicle
)
{
qWarning
()
<<
"Internal error"
;
...
...
@@ -122,6 +123,12 @@ const QVariantList& PX4AutoPilotPlugin::vehicleComponents(void)
}
else
{
qWarning
()
<<
"Call to vehicleCompenents prior to parametersReady"
;
}
if
(
_vehicle
->
parameterManager
()
->
parameterExists
(
_vehicle
->
id
(),
"SLNK_RADIO_CHAN"
))
{
_syslinkComponent
=
new
SyslinkComponent
(
_vehicle
,
this
);
_syslinkComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_syslinkComponent
));
}
}
else
{
qWarning
()
<<
"Internal error"
;
}
...
...
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.h
View file @
d32ab81d
...
...
@@ -24,6 +24,7 @@
#include "MotorComponent.h"
#include "PX4TuningComponent.h"
#include "MixersComponent.h"
#include "SyslinkComponent.h"
#include "Vehicle.h"
#include <QImage>
...
...
@@ -44,7 +45,6 @@ public:
const
QVariantList
&
vehicleComponents
(
void
)
override
;
void
parametersReadyPreChecks
(
void
)
override
;
QString
prerequisiteSetup
(
VehicleComponent
*
component
)
const
override
;
protected:
bool
_incorrectParameterVersion
;
///< true: parameter version incorrect, setup not allowed
PX4AirframeLoader
*
_airframeFacts
;
...
...
@@ -59,7 +59,7 @@ protected:
MotorComponent
*
_motorComponent
;
PX4TuningComponent
*
_tuningComponent
;
MixersComponent
*
_mixersComponent
;
SyslinkComponent
*
_syslinkComponent
;
private:
QVariantList
_components
;
};
...
...
src/QGCApplication.cc
View file @
d32ab81d
...
...
@@ -51,6 +51,7 @@
#include "ScreenToolsController.h"
#include "QFileDialogController.h"
#include "RCChannelMonitorController.h"
#include "SyslinkComponentController.h"
#include "AutoPilotPlugin.h"
#include "VehicleComponent.h"
#include "FirmwarePluginManager.h"
...
...
@@ -390,6 +391,7 @@ void QGCApplication::_initCommon(void)
qmlRegisterType
<
RCChannelMonitorController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"RCChannelMonitorController"
);
qmlRegisterType
<
JoystickConfigController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"JoystickConfigController"
);
qmlRegisterType
<
LogDownloadController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"LogDownloadController"
);
qmlRegisterType
<
SyslinkComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"SyslinkComponentController"
);
#ifndef __mobile__
qmlRegisterType
<
ViewWidgetController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"ViewWidgetController"
);
qmlRegisterType
<
CustomCommandWidgetController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"CustomCommandWidgetController"
);
...
...
src/VehicleSetup/Bootloader.h
View file @
d32ab81d
...
...
@@ -73,7 +73,7 @@ public:
static
const
int
boardIDMINDPXFMUV2
=
88
;
///< MindPX V2 board, as from USB PID
static
const
int
boardIDTAPV1
=
64
;
///< TAP V1 board, as from USB PID
static
const
int
boardIDASCV1
=
65
;
///< ASC V1 board, as from USB PID
static
const
int
boardIDCrazyflie2
=
12
;
///< Crazyflie 2.0 board, as from USB PID
signals:
/// @brief Signals progress indicator for long running bootloader utility routines
void
updateProgress
(
int
curr
,
int
total
);
...
...
src/VehicleSetup/FirmwareUpgradeController.cc
View file @
d32ab81d
...
...
@@ -335,6 +335,14 @@ void FirmwareUpgradeController::_initFirmwareHash()
{
AutoPilotStackPX4
,
BetaFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/beta/asc-v1_default.px4"
},
{
AutoPilotStackPX4
,
DeveloperFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/master/asc-v1_default.px4"
},
};
//////////////////////////////////// Crazyflie 2.0 firmwares //////////////////////////////////////////////////
FirmwareToUrlElement_t
rgCrazyflie2FirmwareArray
[]
=
{
{
AutoPilotStackPX4
,
StableFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/stable/crazyflie_default.px4"
},
{
AutoPilotStackPX4
,
BetaFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/beta/crazyflie_default.px4"
},
{
AutoPilotStackPX4
,
DeveloperFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Firmware/master/crazyflie_default.px4"
},
};
/////////////////////////////// px4flow firmwares ///////////////////////////////////////
FirmwareToUrlElement_t
rgPX4FLowFirmwareArray
[]
=
{
{
PX4Flow
,
StableFirmware
,
DefaultVehicleFirmware
,
"http://px4-travis.s3.amazonaws.com/Flow/master/px4flow.px4"
},
...
...
@@ -406,6 +414,12 @@ void FirmwareUpgradeController::_initFirmwareHash()
_rgASCV1Firmware
.
insert
(
FirmwareIdentifier
(
element
.
stackType
,
element
.
firmwareType
,
element
.
vehicleType
),
element
.
url
);
}
size
=
sizeof
(
rgCrazyflie2FirmwareArray
)
/
sizeof
(
rgCrazyflie2FirmwareArray
[
0
]);
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
const
FirmwareToUrlElement_t
&
element
=
rgCrazyflie2FirmwareArray
[
i
];
_rgCrazyflie2Firmware
.
insert
(
FirmwareIdentifier
(
element
.
stackType
,
element
.
firmwareType
,
element
.
vehicleType
),
element
.
url
);
}
size
=
sizeof
(
rgPX4FLowFirmwareArray
)
/
sizeof
(
rgPX4FLowFirmwareArray
[
0
]);
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
const
FirmwareToUrlElement_t
&
element
=
rgPX4FLowFirmwareArray
[
i
];
...
...
@@ -457,6 +471,8 @@ QHash<FirmwareUpgradeController::FirmwareIdentifier, QString>* FirmwareUpgradeCo
return
&
_rgTAPV1Firmware
;
case
Bootloader
:
:
boardIDASCV1
:
return
&
_rgASCV1Firmware
;
case
Bootloader
:
:
boardIDCrazyflie2
:
return
&
_rgCrazyflie2Firmware
;
case
Bootloader
:
:
boardID3DRRadio
:
return
&
_rg3DRRadioFirmware
;
default:
...
...
src/VehicleSetup/FirmwareUpgradeController.h
View file @
d32ab81d
...
...
@@ -211,6 +211,7 @@ private:
QHash
<
FirmwareIdentifier
,
QString
>
_rgMindPXFMUV2Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgTAPV1Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgASCV1Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgCrazyflie2Firmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rgPX4FLowFirmware
;
QHash
<
FirmwareIdentifier
,
QString
>
_rg3DRRadioFirmware
;
...
...
src/comm/QGCSerialPortInfo.cc
View file @
d32ab81d
...
...
@@ -204,7 +204,6 @@ bool QGCSerialPortInfo::getBoardInfo(QGCSerialPortInfo::BoardType_t& boardType,
if
(
boardType
==
BoardTypeUnknown
)
{
// Fall back to port name matching which could lead to incorrect board mapping. But in some cases the
// vendor and product id do not come through correctly so this is used as a last chance detection method.
for
(
int
i
=
0
;
i
<
_boardFallbackList
.
count
();
i
++
)
{
const
BoardFallback_t
&
boardFallback
=
_boardFallbackList
[
i
];
...
...
src/comm/USBBoardInfo.json
View file @
d32ab81d
...
...
@@ -17,6 +17,7 @@
{
"vendorID"
:
9900
,
"productID"
:
50
,
"boardClass"
:
"Pixhawk", "name"
:
"PX4 FMU V5"
},
{
"vendorID"
:
9900
,
"productID"
:
64
,
"boardClass"
:
"Pixhawk", "name"
:
"TAP V1"
},
{
"vendorID"
:
9900
,
"productID"
:
65
,
"boardClass"
:
"Pixhawk", "name"
:
"ASC V1"
},
{
"vendorID"
:
9900
,
"productID"
:
22
,
"boardClass"
:
"Pixhawk", "name"
:
"Crazyflie 2"
},
{
"vendorID"
:
9900
,
"productID"
:
21
,
"boardClass"
:
"PX4 Flow", "name"
:
"PX4 Flow"
},
...
...
@@ -49,6 +50,8 @@
{
"regExp"
:
"^PX4 ASC v1.x$", "boardClass"
:
"Pixhawk"
},
{
"regExp"
:
"^PX4 BL ASC v1.x$", "boardClass"
:
"Pixhawk"
},
{
"regExp"
:
"^PX4 FMU", "boardClass"
:
"Pixhawk"
},
{
"regExp"
:
"^PX4 Crazyflie v2.0", "boardClass"
:
"Pixhawk"
},
{
"regExp"
:
"^Crazyflie BL", "boardClass"
:
"Pixhawk"
},
{
"regExp"
:
"PX4.*Flow", "boardClass"
:
"PX4 Flow"
},
{
"regExp"
:
"^FT231X USB UART$", "boardClass"
:
"SiK Radio"
},
{
"regExp"
:
"USB UART$", "boardClass"
:
"SiK Radio", "androidOnly"
:
true
,
"comment"
:
"Very broad fallback, too dangerous for non-android"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment