Skip to content

Commit

Permalink
fixed: 120x2 Multi display incorrect in flow overview and Inverter de…
Browse files Browse the repository at this point in the history
…tail
  • Loading branch information
kwindrem committed Dec 13, 2023
1 parent c86cf1a commit 388ce16
Show file tree
Hide file tree
Showing 60 changed files with 3,299 additions and 3,046 deletions.
1 change: 1 addition & 0 deletions FileSets/OverviewAcValuesEnhanced.qml.ALT_ORIG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/opt/victronenergy/gui/qml/OverviewAcValues.qml
1 change: 1 addition & 0 deletions FileSets/fileList
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/opt/victronenergy/gui/qml/PageMain.qml
/opt/victronenergy/gui/qml/main.qml
/opt/victronenergy/gui/qml/ObjectAcConnection.qml
/opt/victronenergy/gui/qml/OverviewAcValuesEnhanced.qml
/opt/victronenergy/gui/qml/OverviewHubEnhanced.qml
/opt/victronenergy/gui/qml/OverviewMobileEnhanced.qml
/opt/victronenergy/gui/qml/HubData.qml
Expand Down
1 change: 1 addition & 0 deletions FileSets/v2.71/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v2.72/OverviewAcValuesEnhanced.qml
29 changes: 20 additions & 9 deletions FileSets/v2.73/DetailInverter.qml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ MbPage {
VBusItem { id: splitPhaseL2Passthru; bind: Utils.path(inverterService, "/Ac/State/SplitPhaseL2Passthru") }
VBusItem { id: phaseCountItem; bind: Utils.path(inverterService, "/Ac/NumberOfPhases") }

property bool splitPhasePassthruDisabled: splitPhaseL2Passthru.valid && splitPhaseL2Passthru.value === 0
property bool noL2inverter: splitPhaseL2Passthru.valid
property bool l2AndL1OutSummed: noL2inverter && splitPhaseL2Passthru.value === 0
property int phaseCount: phaseCountItem.valid ? phaseCountItem.value : 0

// background
Expand Down Expand Up @@ -172,9 +173,19 @@ MbPage {
Text { font.pixelSize: 12; font.bold: true; color: "black"
width: legColumnWidth; horizontalAlignment: Text.AlignHCenter
text: formatValueDiff (pOutL1, pInL1, "W") }
Text { font.pixelSize: 12; font.bold: true; color: "black"
width: legColumnWidth; horizontalAlignment: Text.AlignHCenter
text: splitPhasePassthruDisabled ? "< < <" : formatValueDiff (pOutL2, pInL2, "W"); visible: phaseCount >= 2 }
Text { font.pixelSize: 12; font.bold: true; color: "black"
width: legColumnWidth; horizontalAlignment: Text.AlignHCenter
text:
{
if (l2AndL1OutSummed)
return "< < <"
else if (noL2inverter)
return qsTr("none")
else
return formatValueDiff (pOutL2, pInL2, "W")
}
visible: phaseCount >= 2
}
Text { font.pixelSize: 12; font.bold: true; color: "black"
width: legColumnWidth; horizontalAlignment: Text.AlignHCenter
text: formatValueDiff (pOutL3, pInL3, "W"); visible: phaseCount >= 3 }
Expand Down Expand Up @@ -234,7 +245,7 @@ MbPage {
text: EnhFmt.formatVBusItem (iOutL1, "A") }
Text { font.pixelSize: 12; font.bold: true; color: "black"
width: legColumnWidth; horizontalAlignment: Text.AlignHCenter
text: splitPhasePassthruDisabled ? "< < <" : EnhFmt.formatVBusItem (iOutL2, "A"); visible: phaseCount >= 2 }
text: l2AndL1OutSummed ? "< < <" : EnhFmt.formatVBusItem (iOutL2, "A"); visible: phaseCount >= 2 }
Text { font.pixelSize: 12; font.bold: true; color: "black"
width: legColumnWidth; horizontalAlignment: Text.AlignHCenter
text: EnhFmt.formatVBusItem (iOutL3, "A"); visible: phaseCount >= 3 }
Expand Down Expand Up @@ -279,10 +290,10 @@ MbPage {
}
Row
{
Text { font.pixelSize: 12; font.bold: true; color: "black"
width: rowTitleWidth + totalDataWidth; horizontalAlignment: Text.AlignHCenter
text: qsTr ("L2 Output values included in L1")
visible: splitPhasePassthruDisabled
Text { font.pixelSize: 12; font.bold: true; color: "black"
width: rowTitleWidth + totalDataWidth; horizontalAlignment: Text.AlignHCenter
text: l2AndL1OutSummed ? qsTr ("L2 Output values included in L1") : qsTr ("L2 AC out from AC in (no inverter)")
visible: noL2inverter
}
}
}
Expand Down
10 changes: 1 addition & 9 deletions FileSets/v2.73/OverviewAcValuesEnhanced.qml
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,9 @@ Item {
font.pixelSize: 8
}
TileText {
text:
{
if (root.connection.l1AndL2OutShorted)
return "L2 included in L1"
else
{
return "L2:" + EnhFmt.formatVBusItem (root.connection.powerL2, "W")
text: "L2:" + EnhFmt.formatVBusItem (root.connection.powerL2, "W")
+ " " + EnhFmt.formatVBusItem (root.connection.voltageL2, "V")
+ " " + EnhFmt.formatVBusItem (root.connection.currentL2, "A")
}
}
visible: phaseCount >= 2
font.pixelSize: 11
}
Expand Down
1 change: 1 addition & 0 deletions FileSets/v2.80/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v2.81/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v2.82/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v2.83/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v2.84/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v2.85/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v2.86/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v2.87/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v2.89/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v2.90/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v2.91/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v2.92/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v2.93/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v2.94/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v3.00/OverviewAcValuesEnhanced.qml
1 change: 1 addition & 0 deletions FileSets/v3.00~32/OverviewAcValuesEnhanced.qml
27 changes: 19 additions & 8 deletions FileSets/v3.01/DetailInverter.qml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ MbPage {
VBusItem { id: splitPhaseL2Passthru; bind: Utils.path(inverterService, "/Ac/State/SplitPhaseL2Passthru") }
VBusItem { id: phaseCountItem; bind: Utils.path(inverterService, "/Ac/NumberOfPhases") }

property bool splitPhasePassthruDisabled: splitPhaseL2Passthru.valid && splitPhaseL2Passthru.value === 0
property int phaseCount: phaseCountItem.valid ? phaseCountItem.value : 0
property bool noL2inverter: splitPhaseL2Passthru.valid
property bool l2AndL1OutSummed: noL2inverter && splitPhaseL2Passthru.value === 0
property int phaseCount: phaseCountItem.valid ? phaseCountItem.value : 0

// background
Rectangle
Expand Down Expand Up @@ -172,9 +173,19 @@ MbPage {
Text { font.pixelSize: 12; font.bold: true; color: "black"
width: legColumnWidth; horizontalAlignment: Text.AlignHCenter
text: formatValueDiff (pOutL1, pInL1, "W") }
Text { font.pixelSize: 12; font.bold: true; color: "black"
width: legColumnWidth; horizontalAlignment: Text.AlignHCenter
text: splitPhasePassthruDisabled ? "< < <" : formatValueDiff (pOutL2, pInL2, "W"); visible: phaseCount >= 2 }
Text { font.pixelSize: 12; font.bold: true; color: "black"
width: legColumnWidth; horizontalAlignment: Text.AlignHCenter
text:
{
if (l2AndL1OutSummed)
return "< < <"
else if (noL2inverter)
return qsTr("none")
else
return formatValueDiff (pOutL2, pInL2, "W")
}
visible: phaseCount >= 2
}
Text { font.pixelSize: 12; font.bold: true; color: "black"
width: legColumnWidth; horizontalAlignment: Text.AlignHCenter
text: formatValueDiff (pOutL3, pInL3, "W"); visible: phaseCount >= 3 }
Expand Down Expand Up @@ -234,7 +245,7 @@ MbPage {
text: EnhFmt.formatVBusItem (iOutL1, "A") }
Text { font.pixelSize: 12; font.bold: true; color: "black"
width: legColumnWidth; horizontalAlignment: Text.AlignHCenter
text: splitPhasePassthruDisabled ? "< < <" : EnhFmt.formatVBusItem (iOutL2, "A"); visible: phaseCount >= 2 }
text: l2AndL1OutSummed ? "< < <" : EnhFmt.formatVBusItem (iOutL2, "A"); visible: phaseCount >= 2 }
Text { font.pixelSize: 12; font.bold: true; color: "black"
width: legColumnWidth; horizontalAlignment: Text.AlignHCenter
text: EnhFmt.formatVBusItem (iOutL3, "A"); visible: phaseCount >= 3 }
Expand Down Expand Up @@ -281,8 +292,8 @@ MbPage {
{
Text { font.pixelSize: 12; font.bold: true; color: "black"
width: rowTitleWidth + totalDataWidth; horizontalAlignment: Text.AlignHCenter
text: qsTr ("L2 Output values included in L1")
visible: splitPhasePassthruDisabled
text: l2AndL1OutSummed ? qsTr ("L2 Output values included in L1") : qsTr ("L2 AC out from AC in (no inverter)")
visible: noL2inverter
}
}
}
Expand Down
109 changes: 109 additions & 0 deletions FileSets/v3.01/OverviewAcValuesEnhanced.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
////// modified to show voltage, current and frequency in flow overview
// only displays values for sys.acInput and sys.acLoad
// because other connections don't have related parameters
////// modified to show power bar graphs


import QtQuick 1.1
import "enhancedFormat.js" as EnhFmt

Item {
id: root
width: parent.width
height: parent.height

// NOTE: data is taken by qml, hence it is called connection
property variant connection

property int phaseCount: root.connection !== undefined && root.connection.phaseCount.valid ? root.connection.phaseCount.value : 0

Column {
////// modified to show power bar graphs
y: 6

width: parent.width
spacing: 0

// total power
TileText {
text: EnhFmt.formatVBusItem (root.connection.power)
////// 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
font.pixelSize: 15
}
// current for single leg
TileText {
text: EnhFmt.formatVBusItem (root.connection.currentL1, "A")
font.pixelSize: 15
visible: phaseCount === 1
}

// power, voltage and current for multiple legs
TileText {
text: "L1:" + EnhFmt.formatVBusItem (root.connection.powerL1, "W")
+ " " + EnhFmt.formatVBusItem (root.connection.voltageL1, "V")
+ " " + EnhFmt.formatVBusItem (root.connection.currentL1, "A")
visible: phaseCount >= 2
font.pixelSize: 11
}
// spacer to avoid connection dot
TileText {
text: ""
visible: phaseCount === 2 || phaseCount === 3 && root.height >= 90
font.pixelSize: 8
}
TileText {
text:
{
if (root.connection.l1AndL2OutShorted)
return "L2 included in L1"
else
{
return "L2:" + EnhFmt.formatVBusItem (root.connection.powerL2, "W")
+ " " + EnhFmt.formatVBusItem (root.connection.voltageL2, "V")
+ " " + EnhFmt.formatVBusItem (root.connection.currentL2, "A")
}
}
visible: phaseCount >= 2
font.pixelSize: 11
}
TileText {
text: "L3:" + EnhFmt.formatVBusItem (root.connection.powerL3, "W")
+ " " + EnhFmt.formatVBusItem (root.connection.voltageL3, "V")
+ " " + EnhFmt.formatVBusItem (root.connection.currentL3, "A")
visible: phaseCount >= 3
font.pixelSize: 11
}
// spacer
TileText {
text: ""
visible: phaseCount === 2 && root.height >= 90
font.pixelSize: 11
}
TileText {
text: EnhFmt.formatVBusItem (root.connection.frequency, "Hz")
font.pixelSize: phaseCount >= 2 ? 11 : 15
visible: phaseCount === 1 || root.connection != sys.acInput
}
TileText {
text: qsTr("Limit: ") + EnhFmt.formatVBusItem (root.connection.inCurrentLimit)
font.pixelSize: 15
visible: phaseCount === 1 && root.connection == sys.acInput
}
// frequency and input current limit for multiple legs
TileText {
text: EnhFmt.formatVBusItem (root.connection.frequency, "Hz")
+ " " + EnhFmt.formatVBusItem (root.connection.inCurrentLimit)
font.pixelSize: 11
visible: phaseCount >= 2 && root.connection == sys.acInput
}
}
}
42 changes: 42 additions & 0 deletions FileSets/v3.01/OverviewAcValuesEnhanced.qml.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import QtQuick 1.1

Item {
id: root
width: parent.width

// NOTE: data is taken by qml, hence it is called connection
property variant connection

Column {
y: 0

width: parent.width
spacing: 0

TileText {
text: root.connection ? root.connection.power.format(0) : ""
font.pixelSize: 25
height: 27
}

TileText {
text: root.connection ? "L1: " + root.connection.powerL1.format(0) : ""
visible: root.connection !== undefined && root.connection.phaseCount.valid && root.connection.phaseCount.value > 1 && !root.connection.l1AndL2OutShorted
}

TileText {
text: "L1 + L2"
visible: root.connection !== undefined && root.connection.phaseCount.valid && root.connection.phaseCount.value > 1 && root.connection.l1AndL2OutShorted
}

TileText {
text: root.connection ? "L2: " + (!root.connection.splitPhaseL2PassthruDisabled ? root.connection.powerL2.format(0) : "--") : ""
visible: root.connection !== undefined && root.connection.phaseCount.valid && root.connection.phaseCount.value >= 2 && !root.connection.l1AndL2OutShorted
}

TileText {
text: root.connection ? "L3: " + root.connection.powerL3.format(0) : ""
visible: root.connection !== undefined && root.connection.phaseCount.valid && root.connection.phaseCount.value >= 3
}
}
}
1 change: 1 addition & 0 deletions FileSets/v3.10/OverviewAcValuesEnhanced.qml
Loading

0 comments on commit 388ce16

Please sign in to comment.