Skip to content

Commit

Permalink
Added whisky compass, other fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
vranki committed Nov 25, 2019
1 parent 805c314 commit e00609e
Show file tree
Hide file tree
Showing 16 changed files with 119 additions and 35 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ See installation instructions at https://github.com/vranki/ExtPlane
* Turn & Bank indicator
* Toggle switch (normal & 3-way)
* Attitude Indicator
* Compass
* Compass (basic digital)
* Whisky compass
* Airspeed indicator
* Variometer
* Altimeter
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
extplane-panel (2.0.2) UNRELEASED; urgency=low

* 2.0.2, Fixed more dependencies, better instruments, added whisky compass

-- Ville Ranki <[email protected]> Thu, 19 Sep 2019 12:34:56 +0300

extplane-panel (2.0.1) UNRELEASED; urgency=low

* 2.0.1, Fixed dependencies
Expand Down
5 changes: 5 additions & 0 deletions qmlui/AddItemDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ Dialog {
itemName: "CompassBasic"
description: "Simple digital compass"
}
ListElement {
name: "Whisky Compass"
itemName: "CompassWhisky"
description: "Wet compass used in GA aircraft"
}
ListElement {
name: "Airspeed indicator"
itemName: "needle/AirspeedIndicator"
Expand Down
61 changes: 61 additions & 0 deletions qmlui/panelitems/CompassWhisky.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import QtQuick 2.0
import org.vranki.extplane 1.0

PanelItem {
id: compass
property var labels: ['N', '', '', '3', '', '', '6', '', '', 'E', '', '', '12', '', '', '15', '', '', 'S', '', '', '21', '', '', '24', '', '', 'W', '', '', '30', '', '', '33', '', '']
property int tapeWidth: 500
property int tapeHeight: 30
Component {
id: tape
Item {
id: compassTape
width: tapeWidth
height: tapeHeight
Repeater {
model: 36
Item {
width: 1
height: tapeHeight
x: tapeWidth - tapeWidth * (index/36)
Rectangle {
color: "white"
width: 2
height: tapeHeight * 0.2
y: tapeHeight - height
}
Text {
text: labels[index]
color: "white"
font.pixelSize: tapeHeight * 0.7
anchors.horizontalCenter: parent.horizontalCenter
}
}
}
}
}
Rectangle {
x: parent.width / 2
scale: parent.height / 30
Loader {
id: primaryTape
sourceComponent: tape
x: - (360 - hdgRef.value) * (tapeWidth/360)
}
Loader {
sourceComponent: tape
x: primaryTape.x + ((hdgRef.value > 180) ? -tapeWidth : tapeWidth)
}
}
Rectangle {
color: "white"
width: 3
height: parent.height
anchors.horizontalCenter: parent.horizontalCenter
}
DataRef {
id: hdgRef
name: "sim/cockpit/misc/compass_indicated"
accuracy: 0.5
}
}
3 changes: 1 addition & 2 deletions qmlui/panelitems/needle/AirspeedIndicator.qml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,9 @@ PanelItems.PanelItem {

thickBars: true
showValue: true
fontSizeMultiplier: 0.7
fontSizeMultiplier: 0.6
barValue: settings.thickBarValue
valueMax: Math.round(vneRef.value) || 200
Component.onCompleted: console.log("Thick bars", barCount, barAngle, "values", valueMax, barValue)

GaugeArc { // Vne bar
anchors.fill: parent
Expand Down
2 changes: 1 addition & 1 deletion qmlui/panelitems/needle/Altimeter.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ PanelItems.PanelItem {
DataRef {
id: altitudeRef
name: "sim/flightmodel/misc/h_ind"
accuracy: 10
accuracy: 3
scaleFactor: altitudeConverter.scaleFactor
}

Expand Down
2 changes: 1 addition & 1 deletion qmlui/panelitems/needle/GMeter.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PanelItems.PanelItem {
CircularGauge {
id: gauge
anchors.fill: parent
gaugeValue: parseFloat(gRef.value)
gaugeValue: parseFloat(gRef.value) || 1
barValue: 1
thinBarValue: 0.5
barsAngleMin: barAngle * valueMin
Expand Down
2 changes: 1 addition & 1 deletion qmlui/panelitems/needle/Variometer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ PanelItems.PanelItem {
thickBars: true
showValue: true
absValue: true
fontSizeMultiplier: 1.3
fontSizeMultiplier: 1.2
barValue: settings.isMs ? 1 : 200
valueMax: settings.isMs ? 5 : 1000
valueMin: -valueMax
Expand Down
8 changes: 4 additions & 4 deletions qmlui/panelitems/needle/needle-0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions qmlui/panelitems/needle/needle-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions qmlui/panelitems/needle/needle-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions qmlui/panelitems/needle/needle-3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions qmlui/panelitems/needle/overlay-0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions qmlui/qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@
<file>panelitems/decoration/ImageItem.qml</file>
<file>panelitems/settingsui/FileSelector.qml</file>
<file>panelitems/settingsui/ColorSelector.qml</file>
<file>panelitems/CompassWhisky.qml</file>
</qresource>
</RCC>
11 changes: 7 additions & 4 deletions scripts/ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@ echo "Output dir now:"
ls output
make clean distclean

echo "Building snap.."
rm -rf parts prime stage snap
snapcraft
cp *.snap output

# Disabled as some deps not available on bionic

#echo "Building snap.."
#rm -rf parts prime stage snap
#snapcraft
#cp *.snap output

# Build for windows..
./scripts/cross-compile-win64-from-lin.sh
Expand Down
10 changes: 9 additions & 1 deletion snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: extplane-panel
version: "2.0.0-git"
version: "2.0.2-git"
summary: External networked panel for flight simulators
description: |
External networked panel for flight simulators such
Expand All @@ -20,6 +20,14 @@ parts:
- -r
qt-version: qt5
after: [desktop-qt5, extplane]
stage-packages:
- qml-module-qt-labs-settings
- qml-module-qtquick-layouts
- qml-module-qtquick-window2
- qml-module-qtquick2
- qml-module-qtquick-dialogs
- qml-module-qtquick-controls
- qml-module-qtquick-shapes

apps:
extplane-panel:
Expand Down

0 comments on commit e00609e

Please sign in to comment.