Commit 0a81d37d authored by Gus Grubba's avatar Gus Grubba

Merge branch 'master' of https://github.com/mavlink/qgroundcontrol into Airmap

# Conflicts:
#	libs/mavlink/include/mavlink/v2.0
parents de2115a7 47c1713c
......@@ -5,15 +5,16 @@ if [ ! -d /Volumes/RAMDisk ] ; then
exit 1
fi
#-- Set to my local installation
QMAKE=/Users/gus/Applications/Qt/5.7/ios/bin/qmake
QMAKE=/Users/gus/Applications/Qt/5.11.0/ios/bin/qmake
#-- Using Travis variables as this will eventually live there
SHADOW_BUILD_DIR=/Volumes/RAMDisk/build-qgroundcontrol-iOS-Release
TRAVIS_BUILD_DIR=/Users/gus/github/work/qgroundcontrol
TRAVIS_BUILD_DIR=/Users/gus/github/work/UpstreamQGC
#-- Build it
mkdir -p ${SHADOW_BUILD_DIR} &&
cd ${SHADOW_BUILD_DIR} &&
#-- Create project only (build using Xcode)
${QMAKE} -r ${TRAVIS_BUILD_DIR}/qgroundcontrol.pro CONFIG+=WarningsAsErrorsOn CONFIG-=debug_and_release CONFIG+=release CONFIG+=ForAppStore
sed -i .bak 's/com.yourcompany.${PRODUCT_NAME:rfc1034identifier}/org.QGroundControl.qgc/' ${SHADOW_BUILD_DIR}/QGroundControl.xcodeproj/project.pbxproj
#-- Create and build
#${QMAKE} -r ${TRAVIS_BUILD_DIR}/qgroundcontrol.pro CONFIG+=WarningsAsErrorsOn CONFIG-=debug_and_release CONFIG+=release CONFIG+=ForAppStore &&
#xcodebuild -configuration Release -xcconfig ${TRAVIS_BUILD_DIR}/ios/qgroundcontrol_appstore.xcconfig
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-41.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-60.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "AppIcon29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-87.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "AppIcon40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-120.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "AppIcon60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-180.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-20.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-40.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "AppIcon29x29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "AppIcon29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "AppIcon40x40~ipad.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "AppIcon40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "AppIcon76x76~ipad.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "AppIcon76x76@2x~ipad.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-167.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-1024.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -26,8 +26,6 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>QGCLaunchScreen</string>
<key>UIRequiresFullScreen</key>
<true/>
<key>CFBundleInfoDictionaryVersion</key>
......@@ -38,6 +36,8 @@
<string>Ground Station Location</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Ground Station Location</string>
<key>UILaunchStoryboardName</key>
<string>QGCLaunchScreen</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
......
......@@ -16,51 +16,12 @@
<string>QGC uses UVC devices for video streaming.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>We do not access it. Apple thinks we do.</string>
<key>UILaunchStoryboardName</key>
<string>QGCLaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>AppIcon29x29.png</string>
<string>AppIcon29x29@2x.png</string>
<string>AppIcon40x40@2x.png</string>
<string>AppIcon57x57.png</string>
<string>AppIcon57x57@2x.png</string>
<string>AppIcon60x60@2x.png</string>
</array>
</dict>
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>AppIcon29x29.png</string>
<string>AppIcon29x29@2x.png</string>
<string>AppIcon40x40@2x.png</string>
<string>AppIcon57x57.png</string>
<string>AppIcon57x57@2x.png</string>
<string>AppIcon60x60@2x.png</string>
<string>AppIcon29x29~ipad.png</string>
<string>AppIcon29x29@2x~ipad.png</string>
<string>AppIcon40x40~ipad.png</string>
<string>AppIcon40x40@2x~ipad.png</string>
<string>AppIcon50x50~ipad.png</string>
<string>AppIcon50x50@2x~ipad.png</string>
<string>AppIcon72x72~ipad.png</string>
<string>AppIcon72x72@2x~ipad.png</string>
<string>AppIcon76x76~ipad.png</string>
<string>AppIcon76x76@2x~ipad.png</string>
<string>AppIcon83.5x83.5@2x~ipad.png</string>
</array>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>org.QGroundControl.qgc</string>
<key>CFBundleInfoDictionaryVersion</key>
......@@ -83,8 +44,8 @@
<string>Ground Station Location</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Ground Station Location</string>
<key>UILaunchStoryboardName</key>
<string>QGCLaunchScreen</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Ground Station Location</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>QGroundControl would like to use bluetooth.</string>
<key>UIRequiresFullScreen</key>
......
......@@ -185,6 +185,10 @@
<file alias="buttonLeft.svg">resources/buttonLeft.svg</file>
<file alias="buttonRight.svg">resources/buttonRight.svg</file>
<file alias="cancel.svg">resources/cancel.svg</file>
<file alias="clockwise-arrow.svg">resources/clockwise-arrow.svg</file>
<file alias="counter-clockwise-arrow.svg">resources/counter-clockwise-arrow.svg</file>
<file alias="chevron-down.svg">resources/chevron-down.svg</file>
<file alias="chevron-up.svg">resources/chevron-up.svg</file>
<file alias="gear-black.svg">resources/gear-black.svg</file>
<file alias="gear-white.svg">resources/gear-white.svg</file>
<file alias="helicoptericon.svg">resources/helicoptericon.svg</file>
......
......@@ -62,9 +62,9 @@ iOSBuild {
QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOS-Info.plist
OTHER_FILES += $${BASEDIR}/ios/iOS-Info.plist
}
BUNDLE.files = $$files($$PWD/ios/AppIcon*.png) $$PWD/ios/QGCLaunchScreen.xib $$QMAKE_INFO_PLIST
QMAKE_BUNDLE_DATA += BUNDLE
#-- TODO: Add iTunesArtwork
QMAKE_ASSET_CATALOGS += ios/Images.xcassets
BUNDLE.files = ios/QGCLaunchScreen.xib $$QMAKE_INFO_PLIST
QMAKE_BUNDLE_DATA += BUNDLE
}
LinuxBuild {
......
......@@ -39,6 +39,7 @@
<file alias="GeneralSettings.qml">src/ui/preferences/GeneralSettings.qml</file>
<file alias="GeoTagPage.qml">src/AnalyzeView/GeoTagPage.qml</file>
<file alias="HealthPageWidget.qml">src/FlightMap/Widgets/HealthPageWidget.qml</file>
<file alias="HelpSettings.qml">src/ui/preferences/HelpSettings.qml</file>
<file alias="JoystickConfig.qml">src/VehicleSetup/JoystickConfig.qml</file>
<file alias="LinkSettings.qml">src/ui/preferences/LinkSettings.qml</file>
<file alias="LogDownloadPage.qml">src/AnalyzeView/LogDownloadPage.qml</file>
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="72px" height="72px" viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
<style type="text/css">
.st0{stroke:#000000;stroke-linejoin:round;stroke-miterlimit:10;}
</style>
<path class="st0" d="M36,41.877"/>
<polygon class="st0" points="36,40.818 70.2,33.61 36,50.144 1.8,33.61 "/>
<polygon class="st0" points="36,29.063 70.2,21.856 36,38.39 1.8,21.856 "/>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="72px" height="72px" viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
<style type="text/css">
.st0{stroke:#000000;stroke-linejoin:round;stroke-miterlimit:10;}
</style>
<path class="st0" d="M36,30.123"/>
<polygon class="st0" points="36,31.182 70.2,38.39 36,21.856 1.8,38.39 "/>
<polygon class="st0" points="36,42.937 70.2,50.144 36,33.61 1.8,50.144 "/>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="72px" height="72px" viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
<style type="text/css">
.st0{fill:#010002;stroke:#000000;stroke-width:4;stroke-miterlimit:10;}
</style>
<g>
<path class="st0" d="M70.2,33.1c0-8.7-15-15.5-34.2-15.5S1.8,24.4,1.8,33.1c0,0.6,0.5,1.1,1.1,1.1S4,33.7,4,33.1
c0-7.2,14.7-13.3,32-13.3s32,6.1,32,13.3c0,7.1-14.4,13.2-31.6,13.3l3.9-3.9c0.4-0.4,0.4-1.1,0-1.6c-0.4-0.4-1.1-0.4-1.6,0
l-6.6,6.6l6.6,6.6c0.2,0.2,0.5,0.3,0.8,0.3c0.3,0,0.6-0.1,0.8-0.3c0.4-0.4,0.4-1.1,0-1.6l-3.9-3.9C55.4,48.5,70.2,41.7,70.2,33.1z"
/>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="72px" height="72px" viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
<style type="text/css">
.st0{fill:#010002;stroke:#000000;stroke-width:4;stroke-miterlimit:10;}
</style>
<g>
<path class="st0" d="M35.63,48.573l-3.947,3.945c-0.43,0.43-0.43,1.132,0,1.56c0.214,0.214,0.496,0.322,0.781,0.322
c0.282,0,0.565-0.104,0.781-0.322l6.602-6.6l-6.602-6.597c-0.43-0.428-1.13-0.428-1.56,0c-0.43,0.43-0.43,1.132,0,1.56l3.93,3.925
C18.443,46.276,4.007,40.235,4.007,33.091c0-7.2,14.653-13.285,31.994-13.285s31.994,6.083,31.994,13.285
c0,0.609,0.494,1.103,1.103,1.103c0.609,0,1.103-0.494,1.103-1.103c0-8.687-15.024-15.491-34.2-15.491S1.8,24.402,1.8,33.091
C1.8,41.72,16.634,48.481,35.63,48.573z"/>
</g>
</svg>
......@@ -122,6 +122,9 @@ QString AudioOutput::fixTextMessageForAudio(const QString& string) {
if(result.contains(" EKF ", Qt::CaseInsensitive)) {
result.replace(" EKF ", " Eee Kay Eff ", Qt::CaseInsensitive);
}
if(result.contains("PREARM", Qt::CaseInsensitive)) {
result.replace("PREARM", "pre arm", Qt::CaseInsensitive);
}
// Convert negative numbers
QRegularExpression re(QStringLiteral("(-)[0-9]*\\.?[0-9]"));
......
......@@ -128,9 +128,7 @@ SetupPage {
onWaitingForCancelChanged: {
if (controller.waitingForCancel) {
showMessage(qsTr("Calibration Cancel"), qsTr("Waiting for Vehicle to response to Cancel. This may take a few seconds."), 0)
} else {
hideDialog()
showDialog(waitForCancelDialogComponent, qsTr("Calibration Cancel"), qgcView.showDialogDefaultWidth, 0)
}
}
......@@ -163,6 +161,24 @@ SetupPage {
QGCPalette { id: qgcPal; colorGroupEnabled: true }
Component {
id: waitForCancelDialogComponent
QGCViewMessage {
message: qsTr("Waiting for Vehicle to response to Cancel. This may take a few seconds.")
Connections {
target: controller
onWaitingForCancelChanged: {
if (!controller.waitingForCancel) {
hideDialog()
}
}
}
}
}
Component {
id: singleCompassOnboardResultsComponent
......@@ -265,7 +281,10 @@ SetupPage {
QGCButton {
text: qsTr("Reboot Vehicle")
onClicked: controller.vehicle.reboot()
onClicked: {
controller.vehicle.rebootVehicle()
hideDialog()
}
}
}
}
......@@ -290,8 +309,11 @@ SetupPage {
QGCButton {
text: qsTr("Reboot Vehicle")
onClicked: controller.vehicle.rebootVehicle()
}
onClicked: {
controller.vehicle.rebootVehicle()
hideDialog()
}
}
}
}
}
......
......@@ -167,7 +167,7 @@ void SensorsComponentController::_stopCalibration(SensorsComponentController::St
emit resetStatusTextArea();
}
if (_magCalInProgress) {
emit setCompassRotations();
emit magCalComplete();
}
break;
......
......@@ -92,7 +92,7 @@ signals:
void orientationCalSidesRotateChanged(void);
void resetStatusTextArea(void);
void waitingForCancelChanged(void);
void setCompassRotations(void);
void magCalComplete(void);
private slots:
void _handleUASTextMessage(int uasId, int compId, int severity, QString text);
......
......@@ -131,11 +131,11 @@ Item {
onResetStatusTextArea: statusLog.text = statusTextAreaDefaultText
onSetCompassRotations: {
if (!_sensorsHaveFixedOrientation && (showCompass0Rot || showCompass1Rot || showCompass2Rot)) {
onMagCalComplete: {
//if (!_sensorsHaveFixedOrientation && (showCompass0Rot || showCompass1Rot || showCompass2Rot)) {
setOrientationsDialogShowBoardOrientation = false
showDialog(setOrientationsDialogComponent, qsTr("Set Compass Rotation(s)"), qgcView.showDialogDefaultWidth, StandardButton.Ok)
}
showDialog(setOrientationsDialogComponent, qsTr("Compass Calibration Complete"), qgcView.showDialogDefaultWidth, StandardButton.Ok)
//}
}
onWaitingForCancelChanged: {
......@@ -252,6 +252,20 @@ Item {
anchors.top: parent.top
spacing: ScreenTools.defaultFontPixelHeight
QGCLabel {
width: parent.width
wrapMode: Text.WordWrap
text: qsTr("Set your compass orientations below and the make sure to reboot the vehicle prior to flight.")
}
QGCButton {
text: qsTr("Reboot Vehicle")
onClicked: {
controller.vehicle.rebootVehicle()
hideDialog()
}
}
QGCLabel {
width: parent.width
wrapMode: Text.WordWrap
......
......@@ -71,7 +71,8 @@ Rectangle {
id: editDialogComponent
ParameterEditorDialog {
fact: _fact
fact: _fact
setFocus: ScreenTools.isMobile ? false : true // Works around strange android bug where wrong virtual keyboard is displayed
}
}
......
......@@ -27,7 +27,7 @@ FactValueSliderListModel::FactValueSliderListModel(Fact& fact, QObject* parent)
, _cPrevValues (0)
, _cNextValues (0)
, _initialValue (0)
, _initialValueRounded (0)
, _initialValueAtPrecision (0)
, _increment (0)
{
QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
......@@ -47,14 +47,14 @@ int FactValueSliderListModel::resetInitialValue(void)
}
_initialValue = _fact.cookedValue().toDouble();
_initialValueRounded = qRound(_initialValue);
_initialValueAtPrecision = _valueAtPrecision(_initialValue);
if (qRound(_fact.rawIncrement()) == _fact.rawIncrement()) {
_increment = qRound(_fact.cookedIncrement());
} else {
_increment = _fact.cookedIncrement();
}
_cPrevValues = qMin((_initialValue - _fact.cookedMin().toDouble()), 100.0) / _increment;
_cNextValues = qMin((_fact.cookedMax().toDouble() - _initialValue), 100.0) / _increment;
_cPrevValues = qMin((_initialValue - _fact.cookedMin().toDouble()) / _increment, 100.0);
_cNextValues = qMin((_fact.cookedMax().toDouble() - _initialValue) / _increment, 100.0);
_initialValueIndex = _cPrevValues;
int totalValueCount = _cPrevValues + 1 + _cNextValues;
......@@ -93,12 +93,9 @@ QVariant FactValueSliderListModel::data(const QModelIndex &index, int role) cons
if (cIncrementCount == 0) {
value = _initialValue;
} else {
value = _initialValueRounded + (cIncrementCount * _increment);
value = initialValueAtPrecision() + (cIncrementCount * _increment);
}
double precision = qPow(10, _fact.decimalPlaces());
double atPrecision = qRound(value * precision) / precision;
//qDebug() << value << precision << atPrecision << _fact.decimalPlaces() << _fact.name();
return QVariant(atPrecision);
return QVariant(_valueAtPrecision(value));
} else if (role == _valueIndexRole) {
return QVariant::fromValue(valueIndex);
} else {
......@@ -129,8 +126,8 @@ int FactValueSliderListModel::valueIndexAtModelIndex(int index)
return data(createIndex(index, 0), _valueIndexRole).toInt();
}
double FactValueSliderListModel::initialValueAtPrecision(void)
double FactValueSliderListModel::_valueAtPrecision(double value) const
{
double precision = qPow(10, _fact.decimalPlaces());
return qRound(_initialValue * precision) / precision;
return qRound(value * precision) / precision;
}
......@@ -25,7 +25,7 @@ public:
/// The initial value of the Fact at the meta data specified decimal place precision
Q_PROPERTY(double initialValueAtPrecision READ initialValueAtPrecision NOTIFY initialValueAtPrecisionChanged)
double initialValueAtPrecision(void);
double initialValueAtPrecision(void) const { return _initialValueAtPrecision; }
Q_INVOKABLE int resetInitialValue(void);
Q_INVOKABLE double valueAtModelIndex(int index);
......@@ -35,6 +35,8 @@ signals:
void initialValueAtPrecisionChanged(void);
private:
double _valueAtPrecision(double value) const;
// Overrides from QAbstractListModel
int rowCount(const QModelIndex & parent = QModelIndex()) const override;
QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const override;
......@@ -48,7 +50,7 @@ private:
int _cNextValues;
int _windowSize;
double _initialValue;
double _initialValueRounded;
double _initialValueAtPrecision;
double _increment;
static const int _valueRole;
......
......@@ -505,6 +505,30 @@ const QVariantList& FirmwarePlugin::cameraList(const Vehicle* vehicle)
0, // minTriggerInterval
this);
_cameraList.append(QVariant::fromValue(metaData));
metaData = new CameraMetaData(tr("Sentera NDVI Single Sensor"),
4.68, // sensorWidth
3.56, // sendsorHeight
1248, // imageWidth
952, // imageHeight
4.14, // focalLength
true, // landscape
false, // fixedOrientation
0, // minTriggerInterval
this);
_cameraList.append(QVariant::fromValue(metaData));
metaData = new CameraMetaData(tr("Sentera Double 4K Sensor"),
6.2, // sensorWidth
4.65, // sendsorHeight
4000, // imageWidth
3000, // imageHeight
5.4, // focalLength
true, // landscape
false, // fixedOrientation
0, // minTriggerInterval
this);
_cameraList.append(QVariant::fromValue(metaData));
}
return _cameraList;
......
......@@ -65,7 +65,7 @@ Item {
readonly property string changeAltMessage: qsTr("Change the altitude of the vehicle up or down.")
readonly property string gotoMessage: qsTr("Move the vehicle to the specified location.")
property string setWaypointMessage: qsTr("Adjust current waypoint to %1.").arg(_actionData)
readonly property string orbitMessage: qsTr("Orbit the vehicle around the specified location. Warning: WORK IN PROGRESS!")
readonly property string orbitMessage: qsTr("Orbit the vehicle around the specified location.")
readonly property string landAbortMessage: qsTr("Abort the landing sequence.")
readonly property string pauseMessage: qsTr("Pause the vehicle at it's current position, adjusting altitude up or down as needed.")
readonly property string mvPauseMessage: qsTr("Pause all vehicles at their current position.")
......
......@@ -40,6 +40,7 @@ Item {
height: parent.height
yAxisThrottle: true
lightColors: useLightColors
throttle: true
}
JoystickThumbPad {
......
......@@ -65,7 +65,7 @@ Map {
}
function centerToSpecifiedLocation() {
qgcView.showDialog(specifyMapPositionDialog, qsTr("Specify Position"), qgcView.showDialogDefaultWidth, StandardButton.Cancel)
qgcView.showDialog(specifyMapPositionDialog, qsTr("Specify Position"), qgcView.showDialogDefaultWidth, StandardButton.Close)
}
......
......@@ -26,8 +26,8 @@ const char* CameraCalc::adjustedFootprintSideName = "AdjustedFootprintSi
const char* CameraCalc::_jsonCameraSpecTypeKey = "CameraSpecType";
CameraCalc::CameraCalc(Vehicle* vehicle, QString settingsGroup, QObject* parent)
: CameraSpec (parent)
CameraCalc::CameraCalc(Vehicle* vehicle, const QString& settingsGroup, QObject* parent)
: CameraSpec (settingsGroup, parent)
, _vehicle (vehicle)
, _dirty (false)
, _disableRecalc (false)
......
......@@ -19,7 +19,7 @@ class CameraCalc : public CameraSpec
Q_OBJECT
public:
CameraCalc(Vehicle* vehicle, QString settingsGroup, QObject* parent = NULL);
CameraCalc(Vehicle* vehicle, const QString& settingsGroup, QObject* parent = NULL);
Q_PROPERTY(QString customCameraName READ customCameraName CONSTANT) ///< Camera name for custom camera setting
Q_PROPERTY(QString manualCameraName READ manualCameraName CONSTANT) ///< Camera name for manual camera setting
......
......@@ -21,38 +21,20 @@ const char* CameraSpec::_landscapeName = "Landscape";
const char* CameraSpec::_fixedOrientationName = "FixedOrientation";
const char* CameraSpec::_minTriggerIntervalName = "MinTriggerInterval";
CameraSpec::CameraSpec(QObject* parent)
CameraSpec::CameraSpec(const QString& settingsGroup, QObject* parent)
: QObject (parent)
, _dirty (false)
, _metaDataMap (FactMetaData::createMapFromJsonFile(QStringLiteral(":/json/CameraSpec.FactMetaData.json"), this))
, _sensorWidthFact (0, _sensorWidthName, FactMetaData::valueTypeDouble)
, _sensorHeightFact (0, _sensorHeightName, FactMetaData::valueTypeDouble)