1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-18 08:54:15 +01:00

OP-1648 System panel : Detect CC/CC3D (don't display CpuTemp), "Basic (No Nav)" or "Gps Nav (INS13)" display for attitude estimation

This commit is contained in:
Laurent Lalanne 2014-12-16 19:14:24 +01:00
parent eeddcc902d
commit 57b8014fa8

View File

@ -69,7 +69,10 @@ Item {
property real smeter_angle property real smeter_angle
property real memory_free : SystemStats.HeapRemaining > 1024 ? SystemStats.HeapRemaining / 1024 : SystemStats.HeapRemaining property real memory_free : SystemStats.HeapRemaining > 1024 ? SystemStats.HeapRemaining / 1024 : SystemStats.HeapRemaining
// Needed to get correctly int8 value
property int cpuTemp : SystemStats.CPUTemp
// Needed to get correctly int8 value, reset value (-127) on disconnect // Needed to get correctly int8 value, reset value (-127) on disconnect
property int oplm0_db: telemetry_link == 1 ? OPLinkStatus.PairSignalStrengths_0 : -127 property int oplm0_db: telemetry_link == 1 ? OPLinkStatus.PairSignalStrengths_0 : -127
@ -922,9 +925,9 @@ Item {
} }
Text { Text {
// CC3D hack, Cputemp not working // Coptercontrol detect with mem free : Only display Cpu load, no temperature available.
text: SystemStats.CPULoad+"% - "+ text: SystemStats.CPULoad+"%"+
[String(SystemStats.CPUTemp).charCodeAt(0) == "64" ? "??" : String(SystemStats.CPUTemp).charCodeAt(0)] +"°C" [SystemStats.HeapRemaining < 3000 ? "" : " | "+cpuTemp+"°C"]
anchors.right: parent.right anchors.right: parent.right
color: "white" color: "white"
font { font {
@ -986,12 +989,12 @@ Item {
} }
Text { Text {
text: ["None", "Complementary", "CompMag", "Comp+Mag+GPS", "EKFIndoor", "EKFOutdoor"][RevoSettings.FusionAlgorithm] text: ["None", "Basic (No Nav)", "CompMag", "Comp+Mag+GPS", "EKFIndoor", "GPS Nav (INS13)"][RevoSettings.FusionAlgorithm]
anchors.right: parent.right anchors.right: parent.right
color: "white" color: "white"
font { font {
family: pt_bold.name family: pt_bold.name
pixelSize: Math.floor(parent.height * 1.2) pixelSize: Math.floor(parent.height * 1.35)
weight: Font.DemiBold weight: Font.DemiBold
} }
} }