diff --git a/MILESTONES.txt b/MILESTONES.txt
index 95f7d5ee8..4480129b1 100644
--- a/MILESTONES.txt
+++ b/MILESTONES.txt
@@ -169,32 +169,6 @@ C: Kavin Gustafson (k_g)
D: October 2012
V: http://www.youtube.com/watch?v=MGO68TqIwKk
-M: First successful flight using just a mobile phone
-C: Jose (please complete details), demoed in Portugal
-D:
-V:
-
-M: First CopterControl over 10km FixedWing navigation flight
-C:
-D:
-V:
-
-M: First successful flight using the GCS only and no RC TX
-C:
-D:
-V:
-
-M: First CopterControl Navigation on RC Ground Vechicle
-C:
-D:
-V:
-
-M: First CopterControl Navigation on RC Water Vechicle
-C:
-D:
-V:
-
-
M: First Revo Navigated flight on a FixedWing
C: It got done somewhere along the line, likely Corvus.
@@ -231,16 +205,6 @@ C:
D:
V:
-M: First Revo Altitude Hold using Sonar
-C:
-D:
-V:
-
-M: First use of the Magic Waypoint feature
-C:
-D:
-V:
-
M: First Auto spot landing on a fixed Wing using Revo
C:
D:
diff --git a/Makefile b/Makefile
index 48cb90043..89a7d1cd6 100644
--- a/Makefile
+++ b/Makefile
@@ -740,6 +740,9 @@ ifneq ($(strip $(filter package clean_package,$(MAKECMDGOALS))),)
export PACKAGE_NAME := OpenPilot
export PACKAGE_SEP := -
+ # Copy the Qt libraries regardless whether the building machine needs them to run GCS
+ export FORCE_COPY_QT := true
+
# We can only package release builds
ifneq ($(GCS_BUILD_CONF),release)
$(error Packaging is currently supported for release builds only)
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 5f329b876..ce0845421 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,3 +1,19 @@
+--- RELEASE-14.06.01 ---
+This is the first maintenance release for 14.06.
+This mainly fixes a bug causing flips when switching to Weaklevel flight mode.
+
+The full list of features, improvements and bugfixes in this release is accessible here:
+
+http://progress.openpilot.org/issues/?filter=11660
+
+**Bugs
+ * [OP-1241] - TxPID Does not work for Bank 3 PID settings
+ * [OP-1432] - Hexa config : "Reverse all motors" do not reflect current config after reload
+ * [OP-1454] - weak leveling code buggy, causes NAN and crash!
+
+** New Feature & Improvements
+ * [OP-1450] - GCS fonts are blurry on OSX and retina displays
+
--- RELEASE-14.06 --- Peanuts Schnapps ---
This is the Mid 2014 release.
This version supports the CopterControl, CC3D, Atom and the Revolution Flight controllers as well as the OPLink Modems.
@@ -5,7 +21,7 @@ This version supports the CopterControl, CC3D, Atom and the Revolution Flight co
This release includes many additions, improvements and fixes, it is the result of many thousands of hours of development and testing.
Some key additions in this release:
-- Many additions and changes aimed at gps/navigation functionality for the Revolution platform including GPS assisted flight modes: Return To Base, Position Hold, AutoCruise and Position Vario(LOS, FPV and NSEW).
+- Many additions and changes aimed at gps/navigation functionality for the Revolution platform including GPS assisted flight modes: Return To Base, Position Hold, AutoCruise and Position Vario(LOS, FPV and NSEW).
- Stabilization refactoring and enhancements for even better flight performance.
- Completely new sensor calibration routines and greatly enhanced GUI.
- Additional 3rd Party Hardware support, notably the MS4525DO based airspeed sensors and WS281x LED drivers.
diff --git a/flight/libraries/inc/CoordinateConversions.h b/flight/libraries/inc/CoordinateConversions.h
index f64823a43..c8a391f43 100644
--- a/flight/libraries/inc/CoordinateConversions.h
+++ b/flight/libraries/inc/CoordinateConversions.h
@@ -97,7 +97,7 @@ void rot_mult(float R[3][3], const float vec[3], float vec_out[3]);
* @param b
* @param result
*/
-inline void matrix_mult_3x3f(float a[3][3], float b[3][3], float result[3][3])
+static inline void matrix_mult_3x3f(float a[3][3], float b[3][3], float result[3][3])
{
result[0][0] = a[0][0] * b[0][0] + a[1][0] * b[0][1] + a[2][0] * b[0][2];
result[0][1] = a[0][1] * b[0][0] + a[1][1] * b[0][1] + a[2][1] * b[0][2];
diff --git a/flight/libraries/rscode/ecc.h b/flight/libraries/rscode/ecc.h
index bf56a0b9a..0a6316d8a 100644
--- a/flight/libraries/rscode/ecc.h
+++ b/flight/libraries/rscode/ecc.h
@@ -66,7 +66,7 @@ extern int pBytes[MAXDEG];
extern int synBytes[MAXDEG];
/* print debugging info */
-extern int DEBUG;
+//extern int DEBUG;
/* Reed Solomon encode/decode routines */
void initialize_ecc (void);
diff --git a/flight/libraries/rscode/rs.c b/flight/libraries/rscode/rs.c
index 39c014720..62fd02386 100644
--- a/flight/libraries/rscode/rs.c
+++ b/flight/libraries/rscode/rs.c
@@ -38,7 +38,7 @@ int synBytes[MAXDEG];
/* generator polynomial */
int genPoly[MAXDEG*2];
-int DEBUG = FALSE;
+//int DEBUG = FALSE;
static void
compute_genpoly (int nbytes, int genpoly[]);
diff --git a/flight/pios/inc/pios_debug.h b/flight/pios/inc/pios_debug.h
index 8fd7016a9..4d481dfbd 100644
--- a/flight/pios/inc/pios_debug.h
+++ b/flight/pios/inc/pios_debug.h
@@ -58,7 +58,7 @@ void PIOS_DEBUG_PinHigh(uint8_t pin);
void PIOS_DEBUG_PinLow(uint8_t pin);
void PIOS_DEBUG_PinValue8Bit(uint8_t value);
void PIOS_DEBUG_PinValue4BitL(uint8_t value);
-void PIOS_DEBUG_Panic(const char *msg);
+void PIOS_DEBUG_Panic(const char *msg) __attribute__((noreturn));
#ifdef DEBUG
#define PIOS_DEBUG_Assert(test) if (!(test)) { PIOS_DEBUG_Panic(PIOS_DEBUG_AssertMsg); }
diff --git a/flight/pios/osx/inc/pios_debug.h b/flight/pios/osx/inc/pios_debug.h
index 1d4b88595..460bf7d0a 100644
--- a/flight/pios/osx/inc/pios_debug.h
+++ b/flight/pios/osx/inc/pios_debug.h
@@ -38,7 +38,7 @@ void PIOS_DEBUG_PinHigh(uint8_t pin);
void PIOS_DEBUG_PinLow(uint8_t pin);
void PIOS_DEBUG_PinValue8Bit(uint8_t value);
void PIOS_DEBUG_PinValue4BitL(uint8_t value);
-void PIOS_DEBUG_Panic(const char *msg);
+void PIOS_DEBUG_Panic(const char *msg) __attribute__((noreturn));
#ifdef DEBUG
#define PIOS_DEBUG_Assert(test) if (!(test)) { PIOS_DEBUG_Panic(PIOS_DEBUG_AssertMsg); }
diff --git a/flight/pios/osx/osx/pios_debug.c b/flight/pios/osx/osx/pios_debug.c
index 71120a39d..bb6cd0d9e 100644
--- a/flight/pios/osx/osx/pios_debug.c
+++ b/flight/pios/osx/osx/pios_debug.c
@@ -82,6 +82,11 @@ void PIOS_DEBUG_Panic(const char *msg)
int b = 0;
int a = (2 / b);
b = a;
+
+ // Stay put
+ while (1) {
+ ;
+ }
}
/**
diff --git a/flight/pios/posix/pios_debug.c b/flight/pios/posix/pios_debug.c
index ac67e89a0..1f79c4722 100644
--- a/flight/pios/posix/pios_debug.c
+++ b/flight/pios/posix/pios_debug.c
@@ -81,6 +81,11 @@ void PIOS_DEBUG_Panic(const char *msg)
int b = 0;
int a = (2 / b);
b = a;
+
+ // Stay put
+ while (1) {
+ ;
+ }
}
/**
diff --git a/flight/pios/stm32f10x/pios_ppm_out.c b/flight/pios/stm32f10x/pios_ppm_out.c
index efb6a6a6a..d47934177 100644
--- a/flight/pios/stm32f10x/pios_ppm_out.c
+++ b/flight/pios/stm32f10x/pios_ppm_out.c
@@ -107,7 +107,7 @@ static const struct pios_tim_callbacks tim_out_callbacks = {
int32_t PIOS_PPM_Out_Init(uint32_t *ppm_out_id, const struct pios_ppm_out_cfg *cfg)
{
- PIOS_DEBUG_Assert(ppm_id);
+ PIOS_DEBUG_Assert(ppm_out_id);
PIOS_DEBUG_Assert(cfg);
// Allocate the device structure
diff --git a/flight/pios/stm32f4xx/pios_tim.c b/flight/pios/stm32f4xx/pios_tim.c
index ec72a9c6f..a5b114b0a 100644
--- a/flight/pios/stm32f4xx/pios_tim.c
+++ b/flight/pios/stm32f4xx/pios_tim.c
@@ -171,7 +171,7 @@ int32_t PIOS_TIM_InitChannels(uint32_t *tim_id, const struct pios_tim_channel *c
*/ // commented out for now as f4 starts all clocks
GPIO_Init(chan->pin.gpio, &chan->pin.init);
- PIOS_DEBUG_Assert(chan->remaP);
+ PIOS_DEBUG_Assert(chan->remap);
// Second parameter should technically be PinSource but they are numerically the same
GPIO_PinAFConfig(chan->pin.gpio, chan->pin.pin_source, chan->remap);
diff --git a/flight/targets/boards/oplinkmini/firmware/pios_board.c b/flight/targets/boards/oplinkmini/firmware/pios_board.c
index ba83a3b45..44c981f45 100644
--- a/flight/targets/boards/oplinkmini/firmware/pios_board.c
+++ b/flight/targets/boards/oplinkmini/firmware/pios_board.c
@@ -78,6 +78,7 @@ uint8_t *pios_uart_rx_buffer;
uint8_t *pios_uart_tx_buffer;
uintptr_t pios_uavo_settings_fs_id;
+uintptr_t pios_user_fs_id = 0;
uint8_t servo_count = 0;
diff --git a/flight/targets/boards/osd/firmware/Makefile b/flight/targets/boards/osd/firmware/Makefile
index 3744ee56a..928f1310b 100644
--- a/flight/targets/boards/osd/firmware/Makefile
+++ b/flight/targets/boards/osd/firmware/Makefile
@@ -76,6 +76,8 @@ ifndef TESTAPP
SRC += $(OPUAVSYNTHDIR)/gcstelemetrystats.c
SRC += $(OPUAVSYNTHDIR)/flighttelemetrystats.c
SRC += $(OPUAVSYNTHDIR)/flightstatus.c
+ SRC += $(OPUAVSYNTHDIR)/flightmodesettings.c
+ SRC += $(OPUAVSYNTHDIR)/manualcontrolsettings.c
SRC += $(OPUAVSYNTHDIR)/systemstats.c
SRC += $(OPUAVSYNTHDIR)/systemalarms.c
SRC += $(OPUAVSYNTHDIR)/systemsettings.c
diff --git a/ground/openpilotgcs/copydata.pro b/ground/openpilotgcs/copydata.pro
index d14a816eb..d7fb31c25 100644
--- a/ground/openpilotgcs/copydata.pro
+++ b/ground/openpilotgcs/copydata.pro
@@ -30,7 +30,10 @@ GCS_LIBRARY_PATH
libQt5Qml.so.5 \
libQt5DBus.so.5 \
libQt5QuickParticles.so.5 \
- libqgsttools_p.so.1
+ libqgsttools_p.so.1 \
+ libicui18n.so.52 \
+ libicuuc.so.52 \
+ libicudata.so.52
data_copy.commands += -@$(MKDIR) $$targetPath(\"$$GCS_QT_LIBRARY_PATH\") $$addNewline()
for(lib, QT_LIBS) {
diff --git a/ground/openpilotgcs/openpilotgcs.pri b/ground/openpilotgcs/openpilotgcs.pri
index fd97c3c96..66315baf6 100644
--- a/ground/openpilotgcs/openpilotgcs.pri
+++ b/ground/openpilotgcs/openpilotgcs.pri
@@ -96,13 +96,17 @@ macx {
GCS_QT_LIBRARY_PATH = $$GCS_BUILD_TREE/$$GCS_LIBRARY_BASENAME/qt5
GCS_QT_PLUGINS_PATH = $$GCS_BUILD_TREE/$$GCS_LIBRARY_BASENAME/qt5/plugins
GCS_QT_QML_PATH = $$GCS_BUILD_TREE/$$GCS_LIBRARY_BASENAME/qt5/qml
- lib_dir_is_in_tools = $$[QT_INSTALL_LIBS]
- lib_dir_is_in_tools ~= s,$$(TOOLS_DIR)*,TRUE
- equals(lib_dir_is_in_tools, "TRUE") {
+
+ TOOLS_DIR = $$clean_path($$GCS_SOURCE_TREE/../../tools)
+ QT_INSTALL_DIR = $$clean_path($$[QT_INSTALL_LIBS]/../../../..)
+ equals(QT_INSTALL_DIR, $$TOOLS_DIR) {
copyqt = 1
} else {
- copyqt = 0
+ copyqt = 0
}
+
+ FORCE_COPY_QT = $$(FORCE_COPY_QT)
+ !isEmpty(FORCE_COPY_QT):copyqt = 1
}
GCS_LIBRARY_PATH = $$GCS_BUILD_TREE/$$GCS_LIBRARY_BASENAME/openpilotgcs
GCS_PLUGIN_PATH = $$GCS_LIBRARY_PATH/plugins
diff --git a/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml b/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml
index 88032dc41..023642870 100644
--- a/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml
+++ b/ground/openpilotgcs/share/openpilotgcs/default_configurations/OpenPilotGCS.xml
@@ -2520,47 +2520,11 @@
-
-
- LineardialGadget
-
- Flight Time
-
- uavGadget
-
-
-
- LineardialGadget
-
- Arm Status
-
- uavGadget
-
-
- LineardialGadget
-
- Flight mode
-
- uavGadget
-
- 1
- @Variant(AAAACQAAAAIAAAACAAAAYwAAAAIAAAB7)
- splitter
-
- 1
- @Variant(AAAACQAAAAIAAAACAAAAZgAAAAIAAADf)
- splitter
-
-
PfdQmlGadget
NoTerrain
uavGadget
-
- 2
- @Variant(AAAACQAAAAIAAAACAAAAQAAAAAIAAAG4)
- splitter
@@ -2582,7 +2546,7 @@
splitter
2
- @Variant(AAAACQAAAAIAAAACAAABqQAAAAIAAADm)
+ @Variant(AAAACQAAAAIAAAACAAACigAAAAIAAAE0)
splitter
@@ -2593,7 +2557,7 @@
uavGadget
1
- @Variant(AAAACQAAAAIAAAACAAACdgAAAAIAAAMp)
+ @Variant(AAAACQAAAAIAAAACAAADXwAAAAIAAAQc)
splitter
UAVGadgetManagerV1
diff --git a/ground/openpilotgcs/share/openpilotgcs/dials/deluxe/lineardial-vertical.svg b/ground/openpilotgcs/share/openpilotgcs/dials/deluxe/lineardial-vertical.svg
index 48392fb0a..d0b256548 100644
--- a/ground/openpilotgcs/share/openpilotgcs/dials/deluxe/lineardial-vertical.svg
+++ b/ground/openpilotgcs/share/openpilotgcs/dials/deluxe/lineardial-vertical.svg
@@ -14,8 +14,8 @@
height="322.58304"
id="svg10068"
version="1.1"
- inkscape:version="0.48.2 r9819"
- sodipodi:docname="lineardial-vertical-old2.svg"
+ inkscape:version="0.48.5 r10040"
+ sodipodi:docname="lineardial-vertical.svg"
inkscape:export-filename="H:\Documents\Hobbies\W433\My Gauges\vbat-001.png"
inkscape:export-xdpi="103.61"
inkscape:export-ydpi="103.61"
@@ -757,16 +757,16 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="7.87"
- inkscape:cx="0.68217946"
- inkscape:cy="151.28502"
+ inkscape:zoom="5.6568542"
+ inkscape:cx="26.078149"
+ inkscape:cy="28.131038"
inkscape:document-units="px"
- inkscape:current-layer="layer4"
+ inkscape:current-layer="layer1"
showgrid="false"
- inkscape:window-width="1680"
- inkscape:window-height="957"
+ inkscape:window-width="1280"
+ inkscape:window-height="928"
inkscape:window-x="0"
- inkscape:window-y="0"
+ inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:object-paths="true"
showguides="true"
@@ -782,7 +782,7 @@
image/svg+xml
-
+
Edouard Lafargue
@@ -925,15 +925,15 @@
0 ? Math.floor((wp_eta - wp_eta_h*3600)/60) : 0)
property real wp_eta_s: (wp_eta > 0 ? Math.floor(wp_eta - wp_eta_h*3600 - wp_eta_m*60) : 0)
- property real posEast_old
- property real posNorth_old
- property real total_distance
- property bool init_dist: false
+ property real est_flight_time: Math.round(FlightBatteryState.EstimatedFlightTime)
+ property real est_time_h: (est_flight_time > 0 ? Math.floor(est_flight_time / 3600) : 0 )
+ property real est_time_m: (est_flight_time > 0 ? Math.floor((est_flight_time - est_time_h*3600)/60) : 0)
+ property real est_time_s: (est_flight_time > 0 ? Math.floor(est_flight_time - est_time_h*3600 - est_time_m*60) : 0)
function reset_distance(){
total_distance = 0;
@@ -59,7 +65,115 @@ Item {
else
return time.toString();
}
-
+
+ //
+ // Panel functions
+ //
+
+ property bool hide_display_rc: false
+ property bool hide_display_bat: false
+ property bool hide_display_oplm: false
+
+ function hide_display_rcinput(){
+ if (hide_display_rc == false && hide_display_bat == false && hide_display_oplm == false)
+ hide_display_rc = true;
+ else
+ hide_display_rc = false;
+ battery_bg.z = -1
+ oplm_bg.z = -1
+ }
+
+ function hide_display_battery(){
+ if (hide_display_bat == false && hide_display_rc == false && hide_display_oplm == false)
+ hide_display_bat = true;
+ else
+ hide_display_bat = false;
+ battery_bg.z = 10
+ oplm_bg.z = -1
+ }
+
+ function hide_display_oplink(){
+ if (hide_display_oplm == false && hide_display_rc == false && hide_display_bat == false)
+ hide_display_oplm = true;
+ else
+ hide_display_oplm = false;
+ oplm_bg.z = 20
+ }
+
+ // Uninitialised, Ok, Warning, Critical, Error
+ property variant batColors : ["#2c2929", "green", "orange", "red", "red"]
+
+ property real smeter_angle
+
+ // Needed to get correctly int8 value, reset value (-127) on disconnect
+ property int oplm0_db: OPLinkStatus.LinkState == 4 ? OPLinkStatus.PairSignalStrengths_0 : -127
+ property int oplm1_db: OPLinkStatus.LinkState == 4 ? OPLinkStatus.PairSignalStrengths_1 : -127
+ property int oplm2_db: OPLinkStatus.LinkState == 4 ? OPLinkStatus.PairSignalStrengths_2 : -127
+ property int oplm3_db: OPLinkStatus.LinkState == 4 ? OPLinkStatus.PairSignalStrengths_3 : -127
+
+ // Filtering for S-meter. Smeter range -127dB <--> -13dB = S9+60dB
+
+ Timer {
+ id: smeter_filter0
+ interval: 100; running: true; repeat: true
+ onTriggered: smeter_angle = (0.90 * smeter_angle) + (0.1 * (oplm0_db + 13))
+ }
+
+ Timer {
+ id: smeter_filter1
+ interval: 100; repeat: true
+ onTriggered: smeter_angle = (0.90 * smeter_angle) + (0.1 * (oplm1_db + 13))
+ }
+
+ Timer {
+ id: smeter_filter2
+ interval: 100; repeat: true
+ onTriggered: smeter_angle = (0.90 * smeter_angle) + (0.1 * (oplm2_db + 13))
+ }
+
+ Timer {
+ id: smeter_filter3
+ interval: 100; repeat: true
+ onTriggered: smeter_angle = (0.90 * smeter_angle) + (0.1 * (oplm3_db + 13))
+ }
+
+ property int smeter_filter
+ property variant oplm_pair_id : OPLinkStatus.PairIDs_0
+
+ function select_oplm(index){
+ smeter_filter0.running = false;
+ smeter_filter1.running = false;
+ smeter_filter2.running = false;
+ smeter_filter3.running = false;
+
+ switch(index) {
+ case 0:
+ smeter_filter0.running = true;
+ smeter_filter = 0;
+ oplm_pair_id = OPLinkStatus.PairIDs_0
+ break;
+ case 1:
+ smeter_filter1.running = true;
+ smeter_filter = 1;
+ oplm_pair_id = OPLinkStatus.PairIDs_1
+ break;
+ case 2:
+ smeter_filter2.running = true;
+ smeter_filter = 2;
+ oplm_pair_id = OPLinkStatus.PairIDs_2
+ break;
+ case 3:
+ smeter_filter3.running = true;
+ smeter_filter = 3;
+ oplm_pair_id = OPLinkStatus.PairIDs_3
+ break;
+ }
+ }
+
+ // End Functions
+ //
+ // Start Drawing
+
SvgElementImage {
id: info_bg
sceneSize: info.sceneSize
@@ -67,21 +181,9 @@ Item {
width: parent.width
}
- SvgElementImage {
- id: batinfo_energy
- elementName: "warning-low-energy"
- sceneSize: info.sceneSize
- Rectangle {
- anchors.fill: batinfo_energy
- border.width: 0
- // Alarm based on FlightBatteryState.EstimatedFlightTime < 120s orange, < 60s red
- color: (FlightBatteryState.EstimatedFlightTime <= 120 && FlightBatteryState.EstimatedFlightTime > 60 ? "orange" :
- (FlightBatteryState.EstimatedFlightTime <= 60 ? "red": "black"))
-
- visible: FlightBatteryState.ConsumedEnergy > 0
- }
- }
-
+ //
+ // GPS Info (Top)
+ //
Repeater {
id: satNumberBar
@@ -103,55 +205,18 @@ Item {
elementName: "gps-mode-text"
Text {
- text: ["No GPS", "No Fix", "Fix2D", "Fix3D"][GPSPositionSensor.Status]
+ text: ["NO GPS", "NO FIX", "FIX 2D", "FIX 3D"][GPSPositionSensor.Status]
anchors.centerIn: parent
- font.pixelSize: Math.floor(parent.height*1.2)
+ font.pixelSize: Math.floor(parent.height*1.3)
+ font.family: "Arial"
+ font.weight: Font.DemiBold
color: "white"
}
}
- SvgElementPositionItem {
- sceneSize: info.sceneSize
- elementName: "telemetry-status"
-
- Text {
- text: ["Disconnected","HandshakeReq","HandshakeAck","Connected"][tele_status.toString()]
-
- anchors.centerIn: parent
- font.pixelSize: Math.floor(parent.height*1.2)
- color: "white"
- }
- }
-
- Repeater {
- id: txNumberBar
-
- property int txRateNumber : GCSTelemetryStats.TxDataRate.toFixed()/10 // 250 max
-
- model: 25
- SvgElementImage {
- property int minTxRateNumber : index+1
- elementName: "tx" + minTxRateNumber
- sceneSize: info.sceneSize
- visible: txNumberBar.txRateNumber >= minTxRateNumber && ((GCSTelemetryStats.Status ==3 && OPLinkStatus.LinkState == 4 )
- || (GCSTelemetryStats.Status ==3 && OPLinkStatus.LinkState == 1 ))
- }
- }
-
- Repeater {
- id: rxNumberBar
-
- property int rxRateNumber : GCSTelemetryStats.RxDataRate.toFixed()/100 // 2500 max
-
- model: 25
- SvgElementImage {
- property int minRxRateNumber : index+1
- elementName: "rx" + minRxRateNumber
- sceneSize: info.sceneSize
- visible: rxNumberBar.rxRateNumber >= minRxRateNumber && ((GCSTelemetryStats.Status ==3 && OPLinkStatus.LinkState == 4 )
- || (GCSTelemetryStats.Status ==3 && OPLinkStatus.LinkState == 1 ))
- }
- }
+ //
+ // Waypoint Info (Top)
+ //
SvgElementPositionItem {
sceneSize: info.sceneSize
@@ -163,10 +228,14 @@ Item {
Text {
text: " "+wp_heading.toFixed(1)+"°"
-
anchors.centerIn: parent
- font.pixelSize: parent.height*1.1
- color: "magenta"
+ color: "cyan"
+
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 1.5)
+ weight: Font.DemiBold
+ }
}
}
@@ -180,10 +249,14 @@ Item {
Text {
text: " "+wp_distance.toFixed(0)+" m"
-
anchors.centerIn: parent
- font.pixelSize: parent.height*1.1
- color: "magenta"
+ color: "cyan"
+
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 1.5)
+ weight: Font.DemiBold
+ }
}
}
@@ -195,14 +268,18 @@ Item {
y: Math.floor(scaledBounds.y * sceneItem.height)
visible: OPLinkStatus.LinkState == 4 //OPLink Connected
- MouseArea { id: total_dist_mouseArea; anchors.fill: parent; onClicked: reset_distance()}
+ MouseArea { id: total_dist_mouseArea; anchors.fill: parent; cursorShape: Qt.PointingHandCursor; onClicked: reset_distance()}
Text {
text: " "+total_distance.toFixed(0)+" m"
-
anchors.centerIn: parent
- font.pixelSize: parent.height*1.1
- color: "magenta"
+ color: "cyan"
+
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 1.5)
+ weight: Font.DemiBold
+ }
}
Timer {
@@ -221,10 +298,14 @@ Item {
Text {
text: formatTime(wp_eta_h) + ":" + formatTime(wp_eta_m) + ":" + formatTime(wp_eta_s)
-
anchors.centerIn: parent
- font.pixelSize: parent.height*1.1
- color: "magenta"
+ color: "cyan"
+
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 1.5)
+ weight: Font.DemiBold
+ }
}
}
@@ -238,10 +319,14 @@ Item {
Text {
text: (WaypointActive.Index+1)+" / "+PathPlan.WaypointCount
-
anchors.centerIn: parent
- font.pixelSize: parent.height*1.1
- color: "magenta"
+ color: "cyan"
+
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 1.5)
+ weight: Font.DemiBold
+ }
}
}
@@ -254,101 +339,28 @@ Item {
visible: SystemAlarms.Alarm_PathPlan == 1
Text {
- text: ["Fly End Point","Fly Vector","Fly Circle Right","Fly Circle Left","Drive End Point","Drive Vector","Drive Circle Right",
- "Drive Circle Left","Fixed Attitude","Set Accessory","Land","Disarm Alarm"][PathDesired.Mode]
-
+ text: ["FLY END POINT","FLY VECTOR","FLY CIRCLE RIGHT","FLY CIRCLE LEFT","DRIVE END POINT","DRIVE VECTOR","DRIVE CIRCLE LEFT",
+ "DRIVE CIRCLE RIGHT","FIXED ATTITUDE","SET ACCESSORY","LAND","DISARM ALARM"][PathDesired.Mode]
anchors.centerIn: parent
- font.pixelSize: parent.height*1.1
- color: "magenta"
- }
- }
+ color: "cyan"
- SvgElementPositionItem {
- sceneSize: info.sceneSize
- elementName: "battery-volt-text"
- visible: FlightBatteryState.Voltage > 0
-
- Text {
- text: FlightBatteryState.Voltage.toFixed(2)
- anchors.centerIn: parent
- color: "white"
font {
family: "Arial"
- pixelSize: Math.floor(parent.height * 1.2)
+ pixelSize: Math.floor(parent.height * 1.5)
+ weight: Font.DemiBold
}
}
}
- SvgElementPositionItem {
- sceneSize: info.sceneSize
- elementName: "battery-amp-text"
- visible: FlightBatteryState.Current > 0
-
- Text {
- text: FlightBatteryState.Current.toFixed(2)
- anchors.centerIn: parent
- color: "white"
- font {
- family: "Arial"
- pixelSize: Math.floor(parent.height * 1.2)
- }
- }
- }
-
- SvgElementPositionItem {
- sceneSize: info.sceneSize
- elementName: "battery-milliamp-text"
- visible: FlightBatteryState.ConsumedEnergy > 0
-
- Text {
- text: FlightBatteryState.ConsumedEnergy.toFixed()
- anchors.centerIn: parent
- color: "white"
- font {
- family: "Arial"
- pixelSize: Math.floor(parent.height * 1.2)
- }
- }
- }
-
- Repeater {
- id: throttleNumberBar
-
- property int throttleNumber : ActuatorDesired.Thrust.toFixed(1)*10
-
- model: 10
- SvgElementImage {
- property int minThrottleNumber : index+1
- elementName: "eng" + minThrottleNumber
- sceneSize: info.sceneSize
-
- visible: throttleNumberBar.throttleNumber >= minThrottleNumber
- }
- }
-
- SvgElementImage {
- id: mask_ThrottleBar
- elementName: "throttle-mask"
- sceneSize: info.sceneSize
- }
-
SvgElementImage {
id: mask_SatBar
elementName: "satbar-mask"
sceneSize: info.sceneSize
}
- SvgElementImage {
- id: mask_telemetryTx
- elementName: "tx-mask"
- sceneSize: info.sceneSize
- }
-
- SvgElementImage {
- id: mask_telemetryRx
- elementName: "rx-mask"
- sceneSize: info.sceneSize
- }
+ //
+ // Home info (visible after arming)
+ //
SvgElementImage {
id: home_bg
@@ -359,7 +371,7 @@ Item {
states: State {
name: "fading"
when: TakeOffLocation.Status !== 0
- PropertyChanges { target: home_bg; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width; }
+ PropertyChanges { target: home_bg; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width; }
}
transitions: Transition {
@@ -380,7 +392,7 @@ Item {
states: State {
name: "fading_heading"
when: TakeOffLocation.Status !== 0
- PropertyChanges { target: home_heading_text; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width }
+ PropertyChanges { target: home_heading_text; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width; }
}
transitions: Transition {
@@ -410,7 +422,7 @@ Item {
states: State {
name: "fading_distance"
when: TakeOffLocation.Status !== 0
- PropertyChanges { target: home_distance_text; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width; }
+ PropertyChanges { target: home_distance_text; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width; }
}
transitions: Transition {
@@ -441,7 +453,7 @@ Item {
states: State {
name: "fading_distance"
when: TakeOffLocation.Status !== 0
- PropertyChanges { target: home_eta_text; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width; }
+ PropertyChanges { target: home_eta_text; x: Math.floor(scaledBounds.x * sceneItem.width) + home_bg.width; }
}
transitions: Transition {
@@ -461,6 +473,629 @@ Item {
}
}
+ //
+ // Rc-Input panel
+ //
+
+ SvgElementImage {
+ id: rc_input_bg
+ elementName: "rc-input-bg"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+
+ states: State {
+ name: "fading"
+ when: hide_display_rc !== true
+ PropertyChanges { target: rc_input_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ id: rc_input_anim
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: rc_input_labels
+ elementName: "rc-input-labels"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+
+ states: State {
+ name: "fading"
+ when: hide_display_rc !== true
+ PropertyChanges { target: rc_input_labels; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: rc_input_mousearea
+ elementName: "rc-input-panel-mousearea"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+
+ MouseArea {
+ id: hidedisp_rcinput;
+ anchors.fill: parent;
+ cursorShape: hide_display_bat == false && hide_display_oplm == false ? Qt.WhatsThisCursor : Qt.ArrowCursor
+ onClicked: hide_display_bat == false && hide_display_oplm == false ? hide_display_rcinput() : 0
+ }
+
+ states: State {
+ name: "fading"
+ when: hide_display_rc !== true
+ PropertyChanges { target: rc_input_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: rc_throttle
+ elementName: "rc-throttle"
+ sceneSize: info.sceneSize
+
+ width: scaledBounds.width * sceneItem.width
+ height: (scaledBounds.height * sceneItem.height) * (ManualControlCommand.Throttle)
+
+ x: scaledBounds.x * sceneItem.width
+ y: (scaledBounds.y * sceneItem.height) - rc_throttle.height + (scaledBounds.height * sceneItem.height)
+
+ smooth: true
+
+ states: State {
+ name: "fading"
+ when: hide_display_rc !== true
+ PropertyChanges { target: rc_throttle; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: rc_stick
+ elementName: "rc-stick"
+ sceneSize: info.sceneSize
+
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+
+ x: (scaledBounds.x * sceneItem.width) + (ManualControlCommand.Roll * rc_stick.width * 2.5)
+ y: (scaledBounds.y * sceneItem.height) + (ManualControlCommand.Pitch * rc_stick.width * 2.5)
+
+ smooth: true
+
+ //rotate it around his center
+ transform: Rotation {
+ angle: ManualControlCommand.Yaw * 90
+ origin.y : rc_stick.height / 2
+ origin.x : rc_stick.width / 2
+ }
+
+ states: State {
+ name: "fading"
+ when: hide_display_rc !== true
+ PropertyChanges { target: rc_stick; x: Math.floor(scaledBounds.x * sceneItem.width) - (rc_input_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ //
+ // Battery panel
+ //
+
+ SvgElementImage {
+ id: battery_bg
+ elementName: "battery-bg"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 10
+
+ states: State {
+ name: "fading"
+ when: hide_display_bat !== true
+ PropertyChanges { target: battery_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementPositionItem {
+ id: battery_volt
+ sceneSize: info.sceneSize
+ elementName: "battery-volt-text"
+ z: 11
+
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ y: scaledBounds.y * sceneItem.height
+
+ states: State {
+ name: "fading"
+ when: hide_display_bat !== true
+ PropertyChanges { target: battery_volt; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ color: info.batColors[SystemAlarms.Alarm_Battery]
+ border.color: "white"
+ border.width: battery_volt.width * 0.01
+ radius: border.width * 4
+
+ Text {
+ text: FlightBatteryState.Voltage.toFixed(2)
+ anchors.centerIn: parent
+ color: "white"
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.6)
+ }
+ }
+ }
+ }
+
+ SvgElementPositionItem {
+ id: battery_amp
+ sceneSize: info.sceneSize
+ elementName: "battery-amp-text"
+ z: 12
+
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ y: scaledBounds.y * sceneItem.height
+
+ states: State {
+ name: "fading"
+ when: hide_display_bat !== true
+ PropertyChanges { target: battery_amp; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ color: info.batColors[SystemAlarms.Alarm_Battery]
+ border.color: "white"
+ border.width: battery_volt.width * 0.01
+ radius: border.width * 4
+
+ Text {
+ text: FlightBatteryState.Current.toFixed(2)
+ anchors.centerIn: parent
+ color: "white"
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.6)
+ }
+ }
+ }
+ }
+
+ SvgElementPositionItem {
+ id: battery_milliamp
+ sceneSize: info.sceneSize
+ elementName: "battery-milliamp-text"
+ z: 13
+
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ y: scaledBounds.y * sceneItem.height
+
+ states: State {
+ name: "fading"
+ when: hide_display_bat !== true
+ PropertyChanges { target: battery_milliamp; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+
+ Rectangle {
+ anchors.fill: parent
+
+ // Alarm based on FlightBatteryState.EstimatedFlightTime < 120s orange, < 60s red
+ color: (FlightBatteryState.EstimatedFlightTime <= 120 && FlightBatteryState.EstimatedFlightTime > 60 ? "orange" :
+ (FlightBatteryState.EstimatedFlightTime <= 60 ? "red": info.batColors[SystemAlarms.Alarm_Battery]))
+
+ border.color: "white"
+ border.width: battery_volt.width * 0.01
+ radius: border.width * 4
+
+ Text {
+ text: FlightBatteryState.ConsumedEnergy.toFixed(0)
+ anchors.centerIn: parent
+ color: "white"
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.6)
+ }
+ }
+ }
+ }
+
+ SvgElementPositionItem {
+ id: battery_estimated_flight_time
+ sceneSize: info.sceneSize
+ elementName: "battery-estimated-flight-time"
+ z: 14
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ y: scaledBounds.y * sceneItem.height
+
+ states: State {
+ name: "fading"
+ when: hide_display_bat !== true
+ PropertyChanges { target: battery_estimated_flight_time; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ //color: info.batColors[SystemAlarms.Alarm_Battery]
+
+ // Alarm based on FlightBatteryState.EstimatedFlightTime < 120s orange, < 60s red
+ color: (FlightBatteryState.EstimatedFlightTime <= 120 && FlightBatteryState.EstimatedFlightTime > 60 ? "orange" :
+ (FlightBatteryState.EstimatedFlightTime <= 60 ? "red": info.batColors[SystemAlarms.Alarm_Battery]))
+
+ border.color: "white"
+ border.width: battery_volt.width * 0.01
+ radius: border.width * 4
+
+ Text {
+ text: formatTime(est_time_h) + ":" + formatTime(est_time_m) + ":" + formatTime(est_time_s)
+ anchors.centerIn: parent
+ color: "white"
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.6)
+ }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: battery_labels
+ elementName: "battery-labels"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 15
+ states: State {
+ name: "fading"
+ when: hide_display_bat !== true
+ PropertyChanges { target: battery_labels; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: battery_mousearea
+ elementName: "battery-panel-mousearea"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 16
+
+ MouseArea {
+ id: hidedisp_battery;
+ anchors.fill: parent;
+ cursorShape: hide_display_rc == false && hide_display_oplm == false ? Qt.WhatsThisCursor : Qt.ArrowCursor
+ onClicked: hide_display_rc == false && hide_display_oplm == false ? hide_display_battery() : 0
+ }
+
+ states: State {
+ name: "fading"
+ when: hide_display_bat !== true
+ PropertyChanges { target: battery_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) - (battery_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ //
+ // OPLM panel
+ //
+
+ SvgElementImage {
+ id: oplm_bg
+ elementName: "oplm-bg"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 20
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: oplm_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: smeter_bg
+ elementName: "smeter-bg"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 21
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: smeter_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: smeter_scale
+ elementName: "smeter-scale"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 22
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: smeter_scale; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: smeter_needle
+ elementName: "smeter-needle"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 23
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: smeter_needle; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+
+ transform: Rotation {
+ angle: smeter_angle.toFixed(1)
+ origin.y : smeter_needle.height
+ }
+ }
+
+ SvgElementImage {
+ id: smeter_mask
+ elementName: "smeter-mask"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 24
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: smeter_mask; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: oplm_button_bg
+ elementName: "oplm-button-bg"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 25
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: oplm_button_bg; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ Repeater {
+ model: 4
+
+ SvgElementImage {
+ z: 25
+ property variant idButton_oplm: "oplm_button_" + index
+ property variant idButton_oplm_mousearea: "oplm_button_mousearea" + index
+ property variant button_color: "button"+index+"_color"
+
+ id: idButton_oplm
+
+ elementName: "oplm-button-" + index
+ sceneSize: info.sceneSize
+
+ Rectangle {
+ anchors.fill: parent
+ border.color: "red"
+ border.width: parent.width * 0.04
+ radius: border.width*3
+ color: "transparent"
+ opacity: smeter_filter == index ? 0.5 : 0
+ }
+
+ MouseArea {
+ id: idButton_oplm_mousearea;
+ anchors.fill: parent;
+ cursorShape: Qt.PointingHandCursor
+ onClicked: select_oplm(index)
+ }
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: idButton_oplm; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: oplm_id_label
+ elementName: "oplm-id-label"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 26
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: oplm_id_label; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
+
+ SvgElementPositionItem {
+ id: oplm_id_text
+ sceneSize: info.sceneSize
+ elementName: "oplm-id-text"
+ z: 27
+
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ y: scaledBounds.y * sceneItem.height
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: oplm_id_text; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+
+ Text {
+ text: oplm_pair_id > 0 ? oplm_pair_id.toString(16) : "-- -- -- --"
+ anchors.centerIn: parent
+ color: "white"
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 1.4)
+ weight: Font.DemiBold
+ capitalization: Font.AllUppercase
+ }
+ }
+ }
+
+ SvgElementImage {
+ id: oplm_mousearea
+ elementName: "oplm-panel-mousearea"
+ sceneSize: info.sceneSize
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+ z: 26
+
+ MouseArea {
+ id: hidedisp_oplm;
+ anchors.fill: parent;
+ cursorShape: hide_display_rc == false && hide_display_bat == false ? Qt.WhatsThisCursor : Qt.ArrowCursor
+ onClicked: hide_display_rc == false && hide_display_bat == false ? hide_display_oplink() : 0
+ }
+
+ states: State {
+ name: "fading"
+ when: hide_display_oplm !== true
+ PropertyChanges { target: oplm_mousearea; x: Math.floor(scaledBounds.x * sceneItem.width) - (oplm_bg.width * 0.85); }
+ }
+
+ transitions: Transition {
+ SequentialAnimation {
+ PropertyAnimation { property: "x"; duration: 800 }
+ }
+ }
+ }
SvgElementImage {
id: info_border
diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/VsiScale.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/VsiScale.qml
index c40591424..033c8cb40 100644
--- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/VsiScale.qml
+++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/VsiScale.qml
@@ -3,6 +3,14 @@ import QtQuick 2.0
Item {
id: sceneItem
property variant sceneSize
+ property real vert_velocity
+
+ Timer {
+ interval: 100; running: true; repeat: true
+ onTriggered: vert_velocity = (0.9 * vert_velocity) + (0.1 * VelocityState.Down)
+ }
+
+
SvgElementImage {
id: vsi_window
@@ -13,82 +21,69 @@ Item {
x: Math.floor(scaledBounds.x * sceneItem.width)
y: Math.floor(scaledBounds.y * sceneItem.height)
- property double scaleSteps : 8
- property double scaleStepValue : 1000
- property double scaleStepHeight : height/scaleSteps
+ }
- SvgElementImage {
- id: vsi_bar
+ SvgElementImage {
+ id: vsi_waypoint
+ elementName: "vsi-waypoint"
+ sceneSize: sceneItem.sceneSize
- elementName: "vsi-bar"
- sceneSize: sceneItem.sceneSize
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
- //the scale in 1000 ft/min, convert from VelocityState.Down value in m/s
- height: (-VelocityState.Down*3.28*60/vsi_window.scaleStepValue)*vsi_window.scaleStepHeight
+ x: scaledBounds.x * sceneItem.width
+ y: scaledBounds.y * sceneItem.height
- anchors.bottom: parent.verticalCenter
- anchors.left: parent.left
- }
+ smooth: true
+ visible: VelocityDesired.Down !== 0.0 && FlightStatus.FlightMode > 7
- SvgElementImage {
- id: vsi_scale
-
- elementName: "vsi-scale"
- sceneSize: sceneItem.sceneSize
-
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
-
- //Text labels
- Column {
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.right
-
- Repeater {
- model: [3, 2, 1, 0, 1, 2, 3]
- Item {
- height: vsi_window.scaleStepHeight
- width: vsi_window.width - vsi_scale.width //fill area right to scale
-
- Text {
- text: modelData
- visible: modelData !== 0 //hide "0" label
- color: "white"
- font.pixelSize: parent.height * 0.5
- font.family: "Arial"
-
- anchors.centerIn: parent
- }
- }
- }
- }
+ //rotate it around the center
+ transform: Rotation {
+ angle: -VelocityDesired.Down * 5
+ origin.y : vsi_waypoint.height / 2
+ origin.x : vsi_waypoint.width * 33
}
}
-
SvgElementImage {
- id: vsi_centerline
- clip: true
- smooth: true
+ id: vsi_scale
- elementName: "vsi-centerline"
+ elementName: "vsi-scale"
sceneSize: sceneItem.sceneSize
x: Math.floor(scaledBounds.x * sceneItem.width)
y: Math.floor(scaledBounds.y * sceneItem.height)
+
}
- Text {
- id: vsi_unit_text
- text: "ft / m"
+ SvgElementImage {
+ id: vsi_arrow
+ elementName: "vsi-arrow"
+ sceneSize: sceneItem.sceneSize
- color: "white"
- font {
- family: "Arial"
- pixelSize: sceneSize.height * 0.02
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+
+ x: scaledBounds.x * sceneItem.width
+ y: scaledBounds.y * sceneItem.height
+
+ smooth: true
+
+ //rotate it around the center
+ transform: Rotation {
+ angle: -vert_velocity * 5
+ origin.y : vsi_arrow.height / 2
+ origin.x : vsi_arrow.width * 3.15
}
- anchors.top: vsi_window.bottom
- anchors.left: vsi_window.left
- anchors.margins: font.pixelSize * 0.5
+ }
+
+ SvgElementImage {
+ id: foreground
+ elementName: "foreground"
+ sceneSize: sceneItem.sceneSize
+
+ x: Math.floor(scaledBounds.x * sceneItem.width)
+ y: Math.floor(scaledBounds.y * sceneItem.height)
+
}
}
diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml
index 82030e16b..c6f4e6476 100644
--- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml
+++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml
@@ -6,6 +6,45 @@ Item {
// Uninitialised, OK, Warning, Error, Critical
property variant statusColors : ["gray", "green", "red", "red", "red"]
+ // DisArmed , Arming, Armed
+ property variant armColors : ["gray", "orange", "green"]
+
+ // All 'manual modes' are green, 'assisted' modes in cyan
+ // "MANUAL","STAB 1","STAB 2", "STAB 3", "STAB 4", "STAB 5", "STAB 6", "AUTOTUNE",
+ // "POS HOLD", "POS VFPV", "POS VLOS", "POS VNSEW", "RTB", "LAND", "PATHPLANNER", "POI", "AUTOCRUISE"
+
+ property variant flightmodeColors : ["gray", "green", "green", "green", "green", "green", "green", "red",
+ "cyan", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan"]
+
+ // Manual,Rate,Attitude,AxisLock,WeakLeveling,VirtualBar,Rattitude,RelayRate,RelayAttitude,
+ // AltitudeHold,AltitudeVario,CruiseControl + Auto mode (VTOL/Wing pathfollower)
+ // grey : 'disabled' modes
+
+ property variant thrustmodeColors : ["green", "grey", "grey", "grey", "grey", "grey", "grey", "grey", "grey",
+ "green", "green", "green", "cyan"]
+
+ // SystemSettings.AirframeType 3 - 17 : VtolPathFollower, check ThrustControl
+
+ property var thrust_mode: FlightStatus.FlightMode < 7 ? StabilizationDesired.StabilizationMode_Thrust :
+ FlightStatus.FlightMode > 7 && SystemSettings.AirframeType > 2 && SystemSettings.AirframeType < 18
+ && VtolPathFollowerSettings.ThrustControl == 1 ? 12 :
+ FlightStatus.FlightMode > 7 && SystemSettings.AirframeType < 3 ? 12: 0
+
+
+ property real flight_time: Math.round(SystemStats.FlightTime / 1000)
+ property real time_h: (flight_time > 0 ? Math.floor(flight_time / 3600) : 0 )
+ property real time_m: (flight_time > 0 ? Math.floor((flight_time - time_h*3600)/60) : 0)
+ property real time_s: (flight_time > 0 ? Math.floor(flight_time - time_h*3600 - time_m*60) : 0)
+
+ function formatTime(time) {
+ if (time === 0)
+ return "00"
+ if (time < 10)
+ return "0" + time;
+ else
+ return time.toString();
+ }
+
SvgElementImage {
id: warning_bg
elementName: "warnings-bg"
@@ -14,10 +53,64 @@ Item {
anchors.bottom: parent.bottom
}
+ SvgElementPositionItem {
+ id: warning_time
+ sceneSize: parent.sceneSize
+ elementName: "warning-time"
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ x: scaledBounds.x * sceneItem.width
+ y: scaledBounds.y * sceneItem.height
+
+ Rectangle {
+ anchors.fill: parent
+ color: (SystemStats.FlightTime > 0 ? "green" : "grey")
+
+ Text {
+ anchors.centerIn: parent
+ text: formatTime(time_h) + ":" + formatTime(time_m) + ":" + formatTime(time_s)
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.8)
+ weight: Font.DemiBold
+ }
+ }
+ }
+ }
+
+ SvgElementPositionItem {
+ id: warning_arm
+ sceneSize: parent.sceneSize
+ elementName: "warning-arm"
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ x: scaledBounds.x * sceneItem.width
+ y: scaledBounds.y * sceneItem.height
+
+ Rectangle {
+ anchors.fill: parent
+ color: warnings.armColors[FlightStatus.Armed]
+
+ Text {
+ anchors.centerIn: parent
+ text: ["DISARMED","ARMING","ARMED"][FlightStatus.Armed]
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.74)
+ weight: Font.DemiBold
+ }
+ }
+ }
+ }
+
SvgElementPositionItem {
id: warning_rc_input
sceneSize: parent.sceneSize
elementName: "warning-rc-input"
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ x: scaledBounds.x * sceneItem.width
+ y: scaledBounds.y * sceneItem.height
Rectangle {
anchors.fill: parent
@@ -28,7 +121,7 @@ Item {
text: "RC INPUT"
font {
family: "Arial"
- pixelSize: Math.floor(parent.height * 0.8)
+ pixelSize: Math.floor(parent.height * 0.74)
weight: Font.DemiBold
}
}
@@ -39,6 +132,10 @@ Item {
id: warning_master_caution
sceneSize: parent.sceneSize
elementName: "warning-master-caution"
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ x: scaledBounds.x * sceneItem.width
+ y: scaledBounds.y * sceneItem.height
property bool warningActive: (SystemAlarms.Alarm_BootFault > 1 ||
SystemAlarms.Alarm_OutOfMemory > 1 ||
@@ -48,14 +145,15 @@ Item {
Rectangle {
anchors.fill: parent
color: parent.warningActive ? "red" : "red"
- opacity: parent.warningActive ? 1.0 : 0.15
+ opacity: parent.warningActive ? 1.0 : 0.4
Text {
anchors.centerIn: parent
text: "MASTER CAUTION"
+ color: "white"
font {
family: "Arial"
- pixelSize: Math.floor(parent.height * 0.8)
+ pixelSize: Math.floor(parent.height * 0.74)
weight: Font.DemiBold
}
}
@@ -66,6 +164,10 @@ Item {
id: warning_autopilot
sceneSize: parent.sceneSize
elementName: "warning-autopilot"
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ x: scaledBounds.x * sceneItem.width
+ y: scaledBounds.y * sceneItem.height
Rectangle {
anchors.fill: parent
@@ -76,7 +178,62 @@ Item {
text: "AUTOPILOT"
font {
family: "Arial"
- pixelSize: Math.floor(parent.height * 0.8)
+ pixelSize: Math.floor(parent.height * 0.74)
+ weight: Font.DemiBold
+ }
+ }
+ }
+ }
+
+ SvgElementPositionItem {
+ id: warning_flightmode
+ sceneSize: parent.sceneSize
+ elementName: "warning-flightmode"
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ x: scaledBounds.x * sceneItem.width
+ y: scaledBounds.y * sceneItem.height
+
+ Rectangle {
+ anchors.fill: parent
+ color: warnings.flightmodeColors[FlightStatus.FlightMode]
+
+ Text {
+ anchors.centerIn: parent
+ text: ["MANUAL","STAB 1","STAB 2", "STAB 3", "STAB 4", "STAB 5", "STAB 6", "AUTOTUNE", "POS HOLD", "POS VFPV",
+ "POS VLOS", "POS VNSEW", "RTB", "LAND", "PATHPLAN", "POI", "AUTOCRUISE"][FlightStatus.FlightMode]
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.74)
+ weight: Font.DemiBold
+ }
+ }
+ }
+ }
+
+ SvgElementPositionItem {
+ id: warning_thrustmode
+ sceneSize: parent.sceneSize
+ elementName: "warning-thrustmode"
+ width: scaledBounds.width * sceneItem.width
+ height: scaledBounds.height * sceneItem.height
+ x: scaledBounds.x * sceneItem.width
+ y: scaledBounds.y * sceneItem.height
+
+ Rectangle {
+ anchors.fill: parent
+ color: FlightStatus.FlightMode < 1 ? "grey" : warnings.thrustmodeColors[thrust_mode.toString()]
+
+ // Manual,Rate,Attitude,AxisLock,WeakLeveling,VirtualBar,Rattitude,RelayRate,RelayAttitude,
+ // AltitudeHold,AltitudeVario,CruiseControl
+ // grey : 'disabled' modes
+ Text {
+ anchors.centerIn: parent
+ text: ["MANUAL"," "," ", " ", " ", " ", " ", " ", " ",
+ "ALT HOLD", "ALT VARIO", "CRUISECTRL", "AUTO"][thrust_mode.toString()]
+ font {
+ family: "Arial"
+ pixelSize: Math.floor(parent.height * 0.74)
weight: Font.DemiBold
}
}
@@ -91,22 +248,6 @@ Item {
visible: SystemAlarms.Alarm_GPS > 1
}
- SvgElementImage {
- id: warning_telemetry
- elementName: "warning-telemetry"
- sceneSize: warnings.sceneSize
-
- visible: SystemAlarms.Alarm_Telemetry > 1
- }
-
- SvgElementImage {
- id: warning_battery
- elementName: "warning-battery"
- sceneSize: warnings.sceneSize
- anchors.right: parent.right
- visible: SystemAlarms.Alarm_Battery > 1
- }
-
SvgElementImage {
id: warning_attitude
elementName: "warning-attitude"
diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg b/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg
index eddbc6a21..560b7ee07 100644
--- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg
+++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/pfd.svg
@@ -2,24 +2,79 @@