File tree Expand file tree Collapse file tree 6 files changed +13
-6
lines changed Expand file tree Collapse file tree 6 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 9898 id: loader
9999
100100 asynchronous: true
101- active: Qt . platform . os == " linux " && ! Global .isDesktop
101+ active: Global .isGxDevice
102102 source: " qrc:/qt/qml/Victron/VenusOS/components/InputPanel.qml"
103103 onLoaded: {
104104 item .mainViewItem = mainView
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ QtObject {
6060 property string firmwareInstalledBuild // don't clear this on UI reload. it needs to survive reconnection.
6161 property bool firmwareInstalledBuildUpdated // as above.
6262 property bool isDesktop
63+ property bool isGxDevice: Qt .platform .os === " linux" && ! isDesktop
6364 property real scalingRatio: 1.0
6465
6566 property bool animationEnabled: true // for mock mode only.
Original file line number Diff line number Diff line change 5858 anchors .right : parent .right
5959 width: parent .width - (phaseLabel .visible ? phaseLabel .width : 0 )
6060 height: parent .height
61- sourceComponent: ( Qt . platform . os === " linux " && ! Global .isDesktop ) ? cheapGauge : prettyGauge
61+ sourceComponent: Global .isGxDevice ? cheapGauge : prettyGauge
6262 readonly property bool feedingToGrid: root .inputMode
6363 && (model .power || 0 ) < 0
6464 && Global .systemSettings .essFeedbackToGridEnabled
Original file line number Diff line number Diff line change @@ -120,6 +120,12 @@ QtObject {
120120 Theme .colorScheme = Theme .colorScheme == Theme .Dark ? Theme .Light : Theme .Dark
121121 event .accepted = true
122122 break
123+ case Qt .Key_E :
124+ if (!! Global) {
125+ Global .isGxDevice = ! Global .isGxDevice
126+ event .accepted = true
127+ }
128+ break
123129 case Qt .Key_F :
124130 {
125131 // Toggle ESS feed-in
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ exported power v 0.4 | /
205205 onNextValueRequested: addValue (dcInputRange .valueAsRatio )
206206 }
207207
208- bottomComponent: ( Qt . platform . os === " linux " && ! Global .isDesktop ) ? cheapGaugeDcInput : prettyGaugeDcInput
208+ bottomComponent: Global .isGxDevice ? cheapGaugeDcInput : prettyGaugeDcInput
209209
210210 ValueRange {
211211 id: dcInputRange
@@ -272,7 +272,7 @@ exported power v 0.4 | /
272272 onNextValueRequested: addValue (dcLoadRange .valueAsRatio )
273273 }
274274
275- bottomComponent: ( Qt . platform . os === " linux " && ! Global .isDesktop ) ? cheapGaugeDcLoad : prettyGaugeDcLoad
275+ bottomComponent: Global .isGxDevice ? cheapGaugeDcLoad : prettyGaugeDcLoad
276276
277277 ValueRange {
278278 id: dcLoadRange
Original file line number Diff line number Diff line change @@ -566,9 +566,9 @@ SwipeViewPage {
566566
567567 // Limit the frame rate of widget connector animations
568568 // to 20fps on the GX products
569- property bool notLimitFps : Qt . platform . os !== " linux " || Global .isDesktop
569+ property bool limitFps : Global .isGxDevice
570570 property real animationElapsed
571- onTriggered: if (notLimitFps || (currentFrame % 3 == 0 )) animationElapsed = elapsedTime
571+ onTriggered: if (! limitFps || (currentFrame % 3 == 0 )) animationElapsed = elapsedTime
572572
573573 onRunningChanged: {
574574 if (! running) {
You can’t perform that action at this time.
0 commit comments