Skip to content

Commit

Permalink
Generator Control cards should not be displayed when startStop1 disabled
Browse files Browse the repository at this point in the history
Fixes #1239
  • Loading branch information
MikeTrahearn-Qinetic committed Jan 6, 2025
1 parent 89b184a commit b62d33d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions data/common/Generator.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Device {
readonly property int manualStartTimer: _manualStartTimer.isValid ? _manualStartTimer.value : 0
readonly property int runtime: _runtime.value || 0
readonly property int runningBy: _runningBy.isValid ? _runningBy.value : 0
readonly property bool startstop1Enabled: _startstop1Enabled.value === 1

readonly property string runningByText: Global.generators.runningByText(runningBy)
readonly property string stateText: Global.generators.stateText(state)
Expand Down Expand Up @@ -56,6 +57,10 @@ Device {
uid: serviceUid + "/AutoStartEnabled"
}

readonly property VeQuickItem _startstop1Enabled: VeQuickItem {
uid: serviceUid + "/startstop1/Enabled"
}

function start(durationSecs) {
_manualStartTimer.setValue(durationSecs)
_manualStart.setValue(1)
Expand Down
1 change: 1 addition & 0 deletions pages/controlcards/GeneratorCard.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ControlCard {
title.text: CommonWords.generator
status.text: root.generator.stateText
status.rightPadding: timerDisplay.width + Theme.geometry_controlCard_contentMargins
visible: root.generator.startstop1Enabled

GeneratorIconLabel {
id: timerDisplay
Expand Down

0 comments on commit b62d33d

Please sign in to comment.