Skip to content

Commit

Permalink
Multi LEDs with text for better understanding; show AC input current …
Browse files Browse the repository at this point in the history
…limit even if AC source active
  • Loading branch information
kwindrem committed Oct 31, 2023
1 parent 8341b62 commit 8da7737
Show file tree
Hide file tree
Showing 735 changed files with 706 additions and 638 deletions.
65 changes: 65 additions & 0 deletions FileSets/LedText.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import QtQuick 1.1

Text {
id: root

property alias item: vItem
property alias bind: vItem.bind
property int value: item.valid ? item.value : 0
property string onColor: "#fff930"
property string offColor: "black"
property bool pulse: false
property bool isOn: false

horizontalAlignment: Text.AlignHCenter
font.pixelSize: 12
color: isOn ? onColor : offColor
font.bold: true

onValueChanged: {
switch (value) {
case 0 :
state = "off"
break;
case 1:
state = "on"
break;
case 2:
state = "blink"
break;
case 3:
state = "blinkInverted"
break;
}
}

VBusItem { id: vItem }

Timer {
id: _timer
interval: 500
running: item.value > 0
repeat: true
onTriggered: pulse = !pulse
}

states: [
State {
name: "off"
PropertyChanges { target: root; color : offColor }
},
State {
name: "on"
PropertyChanges { target: root; color : onColor }
},
State {
name: "blink"
PropertyChanges { target: root; color: pulse ? onColor : offColor }
},
State {
name: "blinkInverted"
PropertyChanges { target: root; isOn: !pulse ? onColor : offColor }
}
]
}

50 changes: 37 additions & 13 deletions FileSets/MultiEnhanced.qml
Original file line number Diff line number Diff line change
Expand Up @@ -104,51 +104,75 @@ MbIcon {
}

Column {
spacing: 3
spacing: 0
x: 26
y: 62
y: 58

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/Mains")
text: qsTr("AC In")
font.pixelSize: 8
onColor: "#68FF00"
width: 10; height: 8
}

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/Bulk")
text: qsTr("Bulk")
font.pixelSize: 8
width: 10; height: 8
}

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/Absorption")
text: qsTr("Abs")
font.pixelSize: 8
width: 10; height: 8
}

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/Float")
text: qsTr("Float")
font.pixelSize: 8
width: 10; height: 8
}
}

Column {
spacing: 3
x: multi.width - 28
y: 62
spacing: 0
x: multi.width - 37
y: 58

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/Inverter")
onColor: "#68FF00"
text: qsTr("Invert")
font.pixelSize: 8
width: 10; height: 8
}

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/Overload")
onColor: "#F75E25"
text: qsTr("O / L")
font.pixelSize: 8
width: 10; height: 8
}

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/LowBattery")
onColor: "#F75E25"
text: qsTr("Bat")
font.pixelSize: 8
width: 10; height: 8
}

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/Temperature")
onColor: "#F75E25"
text: qsTr("Temp")
font.pixelSize: 8
width: 10; height: 8
}
}

Expand Down
50 changes: 37 additions & 13 deletions FileSets/MultiEnhancedGP.qml
Original file line number Diff line number Diff line change
Expand Up @@ -104,51 +104,75 @@ MbIcon {
}

Column {
spacing: 3
spacing: 0
x: 26
y: 62
y: 58

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/Mains")
text: qsTr("AC In")
font.pixelSize: 8
onColor: "#68FF00"
width: 10; height: 8
}

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/Bulk")
text: qsTr("Bulk")
font.pixelSize: 8
width: 10; height: 8
}

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/Absorption")
text: qsTr("Abs")
font.pixelSize: 8
width: 10; height: 8
}

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/Float")
text: qsTr("Float")
font.pixelSize: 8
width: 10; height: 8
}
}

Column {
spacing: 3
x: multi.width - 28
y: 62
spacing: 0
x: multi.width - 37
y: 58

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/Inverter")
onColor: "#68FF00"
text: qsTr("Invert")
font.pixelSize: 8
width: 10; height: 8
}

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/Overload")
onColor: "#F75E25"
text: qsTr("O / L")
font.pixelSize: 8
width: 10; height: 8
}

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/LowBattery")
onColor: "#F75E25"
text: qsTr("Bat")
font.pixelSize: 8
width: 10; height: 8
}

Led {
LedText {
bind: Utils.path(inverterService, "/Leds/Temperature")
onColor: "#F75E25"
text: qsTr("Temp")
font.pixelSize: 8
width: 10; height: 8
}
}

Expand Down
7 changes: 3 additions & 4 deletions FileSets/OverviewAcValuesEnhanced.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,19 @@ Item {
////// modified to show power bar graphs
font.pixelSize: 19
height: 21
visible: phaseCount >= 1
}

// voltage for single leg
TileText {
text: EnhFmt.formatVBusItem (root.connection.voltageL1, "V")
visible: phaseCount === 1
visible: phaseCount <= 1
font.pixelSize: 15
}
// current for single leg
TileText {
text: EnhFmt.formatVBusItem (root.connection.currentL1, "A")
font.pixelSize: 15
visible: phaseCount === 1
visible: phaseCount <= 1
}

// power, voltage and current for multiple legs
Expand Down Expand Up @@ -89,7 +88,7 @@ Item {
TileText {
text: qsTr("Limit: ") + EnhFmt.formatVBusItem (root.connection.inCurrentLimit)
font.pixelSize: phaseCount >= 2 ? 11 : 15
visible: phaseCount >= 1 && root.connection == sys.acInput
visible: root.connection == sys.acInput
}
}
}
1 change: 1 addition & 0 deletions FileSets/fileList
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@
/opt/victronenergy/gui/qml/DetailLoadsOnOutput.qml
/opt/victronenergy/gui/qml/PowerGauge.qml
/opt/victronenergy/gui/qml/DetailInverter.qml

2 changes: 1 addition & 1 deletion FileSets/v2.71/MbEditBox.qml
2 changes: 1 addition & 1 deletion FileSets/v2.71/MbEditBoxDateTime.qml
2 changes: 1 addition & 1 deletion FileSets/v2.71/MbSubMenu.qml
2 changes: 1 addition & 1 deletion FileSets/v2.71/Multi.qml
2 changes: 1 addition & 1 deletion FileSets/v2.71/OverviewBox.qml
2 changes: 1 addition & 1 deletion FileSets/v2.71/OverviewConnection.qml
2 changes: 1 addition & 1 deletion FileSets/v2.71/OverviewConnectionEnd.qml
2 changes: 1 addition & 1 deletion FileSets/v2.71/OverviewSolarCharger.qml
2 changes: 1 addition & 1 deletion FileSets/v2.71/OverviewTankDelegate.qml
2 changes: 1 addition & 1 deletion FileSets/v2.71/OverviewTanks.qml
2 changes: 1 addition & 1 deletion FileSets/v2.71/TileText.qml
2 changes: 1 addition & 1 deletion FileSets/v2.71/styles.css
2 changes: 1 addition & 1 deletion FileSets/v2.72/MbEditBox.qml
2 changes: 1 addition & 1 deletion FileSets/v2.72/MbEditBoxDateTime.qml
2 changes: 1 addition & 1 deletion FileSets/v2.72/MbSubMenu.qml
2 changes: 1 addition & 1 deletion FileSets/v2.72/Multi.qml
2 changes: 1 addition & 1 deletion FileSets/v2.72/OverviewBox.qml
2 changes: 1 addition & 1 deletion FileSets/v2.72/OverviewConnection.qml
2 changes: 1 addition & 1 deletion FileSets/v2.72/OverviewConnectionEnd.qml
2 changes: 1 addition & 1 deletion FileSets/v2.72/OverviewSolarCharger.qml
2 changes: 1 addition & 1 deletion FileSets/v2.72/OverviewTankDelegate.qml
2 changes: 1 addition & 1 deletion FileSets/v2.72/OverviewTanks.qml
2 changes: 1 addition & 1 deletion FileSets/v2.72/TileText.qml
Loading

0 comments on commit 8da7737

Please sign in to comment.