diff --git a/FileSets/VersionIndependent/DetailPvInverter.qml b/FileSets/VersionIndependent/DetailPvInverter.qml index 37a444c1..0c15a038 100644 --- a/FileSets/VersionIndependent/DetailPvInverter.qml +++ b/FileSets/VersionIndependent/DetailPvInverter.qml @@ -16,10 +16,12 @@ MbPage property string systemPrefix: "com.victronenergy.system" property color backgroundColor: "#b3b3b3" - property int dataColumns: 4 + property int gridPhaseCount: sys.pvOnGrid.phaseCount.valid ? sys.pvOnGrid.phaseCount.value : 0 + property int outputPhaseCount: sys.pvOnAcOut.phaseCount.valid ? sys.pvOnAcOut.phaseCount.value : 0 + property int phaseCount: Math.max (gridPhaseCount, outputPhaseCount, 1) + property int dataColumns: 2 + phaseCount property int rowTitleWidth: 130 - // gauge and "conneciton column use title width too" - property int totalDataWidth: root.width - (rowTitleWidth * 2) - 10 + property int totalDataWidth: root.width - rowTitleWidth - 10 property int tableColumnWidth: totalDataWidth / dataColumns Component.onCompleted: discoverServices() @@ -38,7 +40,7 @@ MbPage { spacing: 5 anchors.horizontalCenter: parent.horizontalCenter - anchors.top: parent.top; anchors.topMargin: + 10 + anchors.top: parent.top; anchors.topMargin: 5 Column { spacing: 2 @@ -52,13 +54,13 @@ MbPage text: qsTr("Total") } Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: "L1" } + text: "L1"; visible: phaseCount > 1 } Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: "L2" } + text: "L2"; visible: phaseCount >= 2 } Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: "L3" } + text: "L3"; visible: phaseCount >= 3 } } Row { @@ -70,17 +72,17 @@ MbPage text: EnhFmt.formatVBusItem (sys.pvOnGrid.power) } Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: EnhFmt.formatVBusItem (sys.pvOnGrid.powerL1) } + text: EnhFmt.formatVBusItem (sys.pvOnGrid.powerL1); visible: phaseCount > 1 } Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: EnhFmt.formatVBusItem (sys.pvOnGrid.powerL2) } + text: EnhFmt.formatVBusItem (sys.pvOnGrid.powerL2); visible: phaseCount >= 2} Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: EnhFmt.formatVBusItem (sys.pvOnGrid.powerL3) } + text: EnhFmt.formatVBusItem (sys.pvOnGrid.powerL3); visible: phaseCount >= 3} PowerGauge { id: pvGridGauge - width: rowTitleWidth + width: tableColumnWidth height: 15 connection: sys.pvOnGrid maxForwardPowerParameter: "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnGridMaxPower" @@ -97,13 +99,13 @@ MbPage text: EnhFmt.formatVBusItem (sys.pvOnAcOut.power) } Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: EnhFmt.formatVBusItem (sys.pvOnAcOut.powerL1) } + text: EnhFmt.formatVBusItem (sys.pvOnAcOut.powerL1); visible: phaseCount > 1 } Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: EnhFmt.formatVBusItem (sys.pvOnAcOut.powerL2) } + text: EnhFmt.formatVBusItem (sys.pvOnAcOut.powerL2); visible: phaseCount >= 2 } Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: EnhFmt.formatVBusItem (sys.pvOnAcOut.powerL3) } + text: EnhFmt.formatVBusItem (sys.pvOnAcOut.powerL3); visible: phaseCount >= 3 } PowerGauge { id: pvAcOutGauge @@ -120,7 +122,7 @@ MbPage width: rowTitleWidth; horizontalAlignment: Text.AlignHCenter text: qsTr(" ") } } - Row + Row { id: tableHeaderRow Text { font.pixelSize: 12; font.bold: true; color: "black" @@ -131,15 +133,15 @@ MbPage text: qsTr("Total") } Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: "L1" } + text: "L1"; visible: phaseCount > 1 } Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: "L2" } + text: "L2"; visible: phaseCount >= 2 } Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: "L3" } + text: "L3"; visible: phaseCount >= 3 } Text { font.pixelSize: 12; font.bold: true; color: "black" - width: rowTitleWidth; horizontalAlignment: Text.AlignHCenter + width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter text: qsTr("Connection") } } } @@ -164,6 +166,7 @@ MbPage { tableColumnWidth: root.tableColumnWidth rowTitleWidth: root.rowTitleWidth + phaseCount: root.phaseCount width: pvInverterTable.width Connections { diff --git a/FileSets/VersionIndependent/PvInverterRow.qml b/FileSets/VersionIndependent/PvInverterRow.qml index 3ac700c1..69314213 100644 --- a/FileSets/VersionIndependent/PvInverterRow.qml +++ b/FileSets/VersionIndependent/PvInverterRow.qml @@ -9,6 +9,7 @@ Row { // uses the same sizes as DetailsPvCharger page property int tableColumnWidth: 0 property int rowTitleWidth: 0 + property int phaseCount: 0 VBusItem { id: customNameItem; bind: Utils.path(serviceName, "/CustomName") } VBusItem { id: pvTotalPower; bind: Utils.path(serviceName, "/Ac/Power") } @@ -43,15 +44,15 @@ Row { text: EnhFmt.formatVBusItem (pvTotalPower, "W") } Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: EnhFmt.formatVBusItem (pvPowerL1, "W") } + text: EnhFmt.formatVBusItem (pvPowerL1, "W"); visible: phaseCount > 1 } Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: EnhFmt.formatVBusItem (pvPowerL2, "W") } + text: EnhFmt.formatVBusItem (pvPowerL2, "W"); visible: phaseCount >= 2 } Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: EnhFmt.formatVBusItem (pvPowerL3, "W") } + text: EnhFmt.formatVBusItem (pvPowerL3, "W"); visible: phaseCount >= 3 } Text { font.pixelSize: 12; font.bold: true; color: "black" - width: rowTitleWidth; horizontalAlignment: Text.AlignHCenter + width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter text: { if (position.valid) diff --git a/FileSets/v2.73/OverviewHubEnhanced.qml b/FileSets/v2.73/OverviewHubEnhanced.qml index 7e2d5c06..d8b85193 100644 --- a/FileSets/v2.73/OverviewHubEnhanced.qml +++ b/FileSets/v2.73/OverviewHubEnhanced.qml @@ -905,15 +905,11 @@ OverviewPage { top: parent.top; topMargin: 19 horizontalCenter: parent.horizontalCenter } - maxForwardPowerParameter: - { - if (hasAcSolarOnOut) - return "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnOutputMaxPower" - else - return "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnGridMaxPower" - } - connection: hasAcSolarOnOut ? sys.pvOnAcOut : hasAcSolarOnAcIn1 ? sys.pvOnAcIn1 : sys.pvOnAcIn2 - visible: showGauges && showAcSolar && !showDcAndAcSolar + maxForwardPowerParameter: "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnOutputMaxPower" + maxForwardPowerParameter2: "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnGridMaxPower" + connection: sys.pvOnAcOut + connection2: sys.pvOnGrid + visible: showGauges && showAcSolar } DetailTarget { id: pvInverterTarget; detailsPage: "DetailPvInverter.qml" } } diff --git a/FileSets/v2.73/PowerGauge.qml b/FileSets/v2.73/PowerGauge.qml index 36b93552..e8e4054c 100644 --- a/FileSets/v2.73/PowerGauge.qml +++ b/FileSets/v2.73/PowerGauge.qml @@ -13,25 +13,34 @@ Item { property bool darkMode: darkModeItem.valid && darkModeItem.value == 1 property variant connection + // connection2 accommodates combined PV inverter AC input and AC output + property variant connection2: undefined + property bool includeConnection2: connection2 != undefined + property bool reversePower: false property bool useInputCurrentLimit: false property variant endLabelFontSize: 16 property color endLabelBackgroundColor: "transparent" - property int phaseCount: root.connection == undefined ? 0 : root.connection.l1AndL2OutShorted ? 1 : connection.phaseCount != undefined && connection.phaseCount.valid ? connection.phaseCount.value : 1 + property int phaseCount1: root.connection == undefined ? 0 : root.connection.l1AndL2OutShorted ? 1 : connection.phaseCount != undefined && connection.phaseCount.valid ? connection.phaseCount.value : 1 + property int phaseCount2: root.connection2 == undefined ? 0 : root.connection2.l1AndL2OutShorted ? 1 : connection2.phaseCount != undefined && connection2.phaseCount.valid ? connection2.phaseCount.value : 1 + + property int phaseCount: includeConnection2 ? Math.max (phaseCount1, phaseCount2) : phaseCount1 - property string maxForwardPowerParameter: "" - VBusItem { id: maxForwardLimitItem; bind: root.maxForwardPowerParameter } + property string maxForwardPowerParameter: "" + VBusItem { id: maxForwardLimitItem; bind: root.maxForwardPowerParameter } + property string maxForwardPowerParameter2: "" + VBusItem { id: maxForwardLimitItem2; bind: root.maxForwardPowerParameter2 } - property string maxReversePowerParameter: "" - VBusItem { id: maxReverseLimitItem; bind: root.maxReversePowerParameter } + property string maxReversePowerParameter: "" + VBusItem { id: maxReverseLimitItem; bind: root.maxReversePowerParameter } - property real inPowerLimit: sys.acInput.inCurrentLimit.valid ? sys.acInput.inCurrentLimit.value * sys.acInput.voltageL1.value : 0 + property real inPowerLimit: sys.acInput.inCurrentLimit.valid ? sys.acInput.inCurrentLimit.value * sys.acInput.voltageL1.value : 0 - property real maxForwardLimit: useInputCurrentLimit ? inPowerLimit : maxForwardLimitItem.valid ? maxForwardLimitItem.value : 0 - property real maxReverseLimit: maxReverseLimitItem.valid ? maxReverseLimitItem.value : 0 + property real maxForwardLimit: useInputCurrentLimit ? inPowerLimit : maxForwardLimitItem.valid ? maxForwardLimitItem.value : 0 + maxForwardLimitItem2.valid ? maxForwardLimitItem2.value : 0 + property real maxReverseLimit: maxReverseLimitItem.valid ? maxReverseLimitItem.value : 0 // overload range is 10% of forward to reverse limits property real overload: (maxForwardLimit + maxReverseLimit) * 0.1 property real maxForwardDisplayed: maxForwardLimit > 0 ? maxForwardLimit + overload : 0 @@ -216,13 +225,15 @@ Item { function calculateBar1width () { - var currentValue, barWidth + var currentValue = 0.0, barWidth if (root.connection.powerL1 != undefined) - currentValue = root.connection.powerL1.valid ? root.connection.powerL1.value : 0 + currentValue += root.connection.powerL1.valid ? root.connection.powerL1.value : 0 else if (root.connection.power != undefined) - currentValue = root.connection.power.valid ? root.connection.power.value : 0 - else - currentValue = 0 + currentValue += root.connection.power.valid ? root.connection.power.value : 0 + if (includeConnection2 && root.connection2.powerL1 != undefined) + currentValue += root.connection2.powerL1.valid ? root.connection2.powerL1.value : 0 + else if (includeConnection2 && root.connection2.power != undefined) + currentValue += root.connection2.power.valid ? root.connection2.power.value : 0 if (reversePower) currentValue = -currentValue @@ -246,7 +257,10 @@ Item { { var currentValue, barWidth currentValue = root.connection.powerL2.valid ? root.connection.powerL2.value : 0 - if (reversePower) + if (includeConnection2) + currentValue += root.connection2.powerL2.valid ? root.connection2.powerL2.value : 0 + + if (reversePower) currentValue = -currentValue root.bar2color = getBarColor (currentValue) barWidth = Math.min ( Math.max (currentValue, -maxReverseDisplayed), maxForwardDisplayed) * scaleFactor @@ -267,7 +281,10 @@ Item { { var currentValue, barWidth currentValue = root.connection.powerL3.valid ? root.connection.powerL3.value : 0 - if (reversePower) + if (includeConnection2) + currentValue += root.connection2.powerL3.valid ? root.connection2.powerL3.value : 0 + + if (reversePower) currentValue = -currentValue root.bar3color = getBarColor (currentValue) barWidth = Math.min ( Math.max (currentValue, -maxReverseDisplayed), maxForwardDisplayed) * scaleFactor diff --git a/FileSets/v3.01/OverviewHubEnhanced.qml b/FileSets/v3.01/OverviewHubEnhanced.qml index c8fd453e..18f400d1 100644 --- a/FileSets/v3.01/OverviewHubEnhanced.qml +++ b/FileSets/v3.01/OverviewHubEnhanced.qml @@ -966,15 +966,11 @@ OverviewPage { top: parent.top; topMargin: 19 horizontalCenter: parent.horizontalCenter } - maxForwardPowerParameter: - { - if (hasAcSolarOnOut) - return "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnOutputMaxPower" - else - return "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnGridMaxPower" - } - connection: hasAcSolarOnOut ? sys.pvOnAcOut : hasAcSolarOnAcIn1 ? sys.pvOnAcIn1 : sys.pvOnAcIn2 - visible: showGauges && showAcSolar && !showDcAndAcSolar + maxForwardPowerParameter: "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnOutputMaxPower" + maxForwardPowerParameter2: "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnGridMaxPower" + connection: sys.pvOnAcOut + connection2: sys.pvOnGrid + visible: showGauges && showAcSolar } DetailTarget { id: pvInverterTarget; detailsPage: "DetailPvInverter.qml" } } diff --git a/FileSets/v3.01/PowerGauge.qml b/FileSets/v3.01/PowerGauge.qml index 36b93552..37aca5d9 100644 --- a/FileSets/v3.01/PowerGauge.qml +++ b/FileSets/v3.01/PowerGauge.qml @@ -13,24 +13,31 @@ Item { property bool darkMode: darkModeItem.valid && darkModeItem.value == 1 property variant connection + // connection2 accommodates combined PV inverter AC input and AC output + property variant connection2: undefined + property bool includeConnection2: connection2 != undefined property bool reversePower: false property bool useInputCurrentLimit: false property variant endLabelFontSize: 16 property color endLabelBackgroundColor: "transparent" - property int phaseCount: root.connection == undefined ? 0 : root.connection.l1AndL2OutShorted ? 1 : connection.phaseCount != undefined && connection.phaseCount.valid ? connection.phaseCount.value : 1 + property int phaseCount1: root.connection == undefined ? 0 : root.connection.l1AndL2OutShorted ? 1 : connection.phaseCount != undefined && connection.phaseCount.valid ? connection.phaseCount.value : 1 + property int phaseCount2: root.connection2 == undefined ? 0 : root.connection2.l1AndL2OutShorted ? 1 : connection2.phaseCount != undefined && connection2.phaseCount.valid ? connection2.phaseCount.value : 1 + property int phaseCount: includeConnection2 ? Math.max (phaseCount1, phaseCount2) : phaseCount1 - property string maxForwardPowerParameter: "" - VBusItem { id: maxForwardLimitItem; bind: root.maxForwardPowerParameter } + property string maxForwardPowerParameter: "" + VBusItem { id: maxForwardLimitItem; bind: root.maxForwardPowerParameter } + property string maxForwardPowerParameter2: "" + VBusItem { id: maxForwardLimitItem2; bind: root.maxForwardPowerParameter2 } property string maxReversePowerParameter: "" VBusItem { id: maxReverseLimitItem; bind: root.maxReversePowerParameter } property real inPowerLimit: sys.acInput.inCurrentLimit.valid ? sys.acInput.inCurrentLimit.value * sys.acInput.voltageL1.value : 0 - property real maxForwardLimit: useInputCurrentLimit ? inPowerLimit : maxForwardLimitItem.valid ? maxForwardLimitItem.value : 0 + property real maxForwardLimit: useInputCurrentLimit ? inPowerLimit : maxForwardLimitItem.valid ? maxForwardLimitItem.value : 0 + maxForwardLimitItem2.valid ? maxForwardLimitItem2.value : 0 property real maxReverseLimit: maxReverseLimitItem.valid ? maxReverseLimitItem.value : 0 // overload range is 10% of forward to reverse limits property real overload: (maxForwardLimit + maxReverseLimit) * 0.1 @@ -218,11 +225,13 @@ Item { { var currentValue, barWidth if (root.connection.powerL1 != undefined) - currentValue = root.connection.powerL1.valid ? root.connection.powerL1.value : 0 + currentValue += root.connection.powerL1.valid ? root.connection.powerL1.value : 0 else if (root.connection.power != undefined) - currentValue = root.connection.power.valid ? root.connection.power.value : 0 - else - currentValue = 0 + currentValue += root.connection.power.valid ? root.connection.power.value : 0 + if (includeConnection2 && root.connection2.powerL1 != undefined) + currentValue += root.connection2.powerL1.valid ? root.connection2.powerL1.value : 0 + else if (includeConnection2 && root.connection2.power != undefined) + currentValue += root.connection2.power.valid ? root.connection2.power.value : 0 if (reversePower) currentValue = -currentValue @@ -246,7 +255,10 @@ Item { { var currentValue, barWidth currentValue = root.connection.powerL2.valid ? root.connection.powerL2.value : 0 - if (reversePower) + if (includeConnection2) + currentValue += root.connection2.powerL2.valid ? root.connection2.powerL2.value : 0 + + if (reversePower) currentValue = -currentValue root.bar2color = getBarColor (currentValue) barWidth = Math.min ( Math.max (currentValue, -maxReverseDisplayed), maxForwardDisplayed) * scaleFactor @@ -267,7 +279,10 @@ Item { { var currentValue, barWidth currentValue = root.connection.powerL3.valid ? root.connection.powerL3.value : 0 - if (reversePower) + if (includeConnection2) + currentValue += root.connection2.powerL3.valid ? root.connection2.powerL3.value : 0 + + if (reversePower) currentValue = -currentValue root.bar3color = getBarColor (currentValue) barWidth = Math.min ( Math.max (currentValue, -maxReverseDisplayed), maxForwardDisplayed) * scaleFactor diff --git a/FileSets/v3.40~13/OverviewHubEnhanced.qml b/FileSets/v3.40~13/OverviewHubEnhanced.qml index fd22b360..53523ac6 100644 --- a/FileSets/v3.40~13/OverviewHubEnhanced.qml +++ b/FileSets/v3.40~13/OverviewHubEnhanced.qml @@ -953,7 +953,6 @@ OverviewPage { } ] ////// add power bar graph -////// only shows one of possibly 3 PV inverter locations !!!!!!!!!!!!!!!!!!!!! PowerGauge { id: pvInverterBar @@ -964,15 +963,11 @@ OverviewPage { top: parent.top; topMargin: 19 horizontalCenter: parent.horizontalCenter } - maxForwardPowerParameter: - { - if (hasAcSolarOnOut) - return "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnOutputMaxPower" - else - return "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnGridMaxPower" - } - connection: hasAcSolarOnOut ? sys.pvOnAcOut : hasAcSolarOnAcIn1 ? sys.pvOnAcIn1 : sys.pvOnAcIn2 - visible: showGauges && showAcSolar && !showDcAndAcSolar + maxForwardPowerParameter: "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnOutputMaxPower" + maxForwardPowerParameter2: "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnGridMaxPower" + connection: sys.pvOnAcOut + connection2: sys.pvOnGrid + visible: showGauges && showAcSolar } DetailTarget { id: pvInverterTarget; detailsPage: "DetailPvInverter.qml" } } diff --git a/FileSets/v3.40~13/PowerGauge.qml b/FileSets/v3.40~13/PowerGauge.qml index 91166066..e55a9a85 100644 --- a/FileSets/v3.40~13/PowerGauge.qml +++ b/FileSets/v3.40~13/PowerGauge.qml @@ -12,25 +12,35 @@ Item { property VBusItem darkModeItem: VBusItem { bind: "com.victronenergy.settings/Settings/GuiMods/DarkMode" } property bool darkMode: darkModeItem.valid && darkModeItem.value == 1 - property variant connection + property variant connection + // connection2 accommodates combined PV inverter AC input and AC output + property variant connection2: undefined + property bool includeConnection2: connection2 != undefined property bool reversePower: false property bool useInputCurrentLimit: false property variant endLabelFontSize: 16 property color endLabelBackgroundColor: "transparent" - property int reportedPhaseCount: connection == undefined ? 0 : connection.phaseCount == undefined || ! connection.phaseCount.valid ? 1 : connection.phaseCount.value - property int phaseCount: reportedPhaseCount < 2 ? reportedPhaseCount : (connection.isAcOutput ? connection.l2AndL1OutSummed : connection.splitPhaseL2PassthruDisabled) ? 1 : connection.phaseCount.value + property int reportedPhaseCount1: connection == undefined ? 0 : connection.phaseCount == undefined || ! connection.phaseCount.valid ? 1 : connection.phaseCount.value + property int phaseCount1: reportedPhaseCount1 < 2 ? reportedPhaseCount1 : (connection.isAcOutput ? connection.l2AndL1OutSummed : connection.splitPhaseL2PassthruDisabled) ? 1 : connection.phaseCount.value - property string maxForwardPowerParameter: "" - VBusItem { id: maxForwardLimitItem; bind: root.maxForwardPowerParameter } + property int reportedPhaseCount2: connection2 == undefined ? 0 : connection2.phaseCount == undefined || ! connection2.phaseCount.valid ? 1 : connection2.phaseCount.value + property int phaseCount2: reportedPhaseCount2 < 2 ? reportedPhaseCount2 : (connection2.isAcOutput ? connection2.l2AndL1OutSummed : connection2.splitPhaseL2PassthruDisabled) ? 1 : connection2.phaseCount.value + + property int phaseCount: includeConnection2 ? Math.max (phaseCount1, phaseCount2) : phaseCount1 + + property string maxForwardPowerParameter: "" + VBusItem { id: maxForwardLimitItem; bind: root.maxForwardPowerParameter } + property string maxForwardPowerParameter2: "" + VBusItem { id: maxForwardLimitItem2; bind: root.maxForwardPowerParameter2 } property string maxReversePowerParameter: "" VBusItem { id: maxReverseLimitItem; bind: root.maxReversePowerParameter } property real inPowerLimit: sys.acInput.inCurrentLimit.valid ? sys.acInput.inCurrentLimit.value * sys.acInput.voltageL1.value : 0 - property real maxForwardLimit: useInputCurrentLimit ? inPowerLimit : maxForwardLimitItem.valid ? maxForwardLimitItem.value : 0 + property real maxForwardLimit: useInputCurrentLimit ? inPowerLimit : maxForwardLimitItem.valid ? maxForwardLimitItem.value : 0 + maxForwardLimitItem2.valid ? maxForwardLimitItem2.value : 0 property real maxReverseLimit: maxReverseLimitItem.valid ? maxReverseLimitItem.value : 0 // overload range is 10% of forward to reverse limits property real overload: (maxForwardLimit + maxReverseLimit) * 0.1 @@ -216,13 +226,15 @@ Item { function calculateBar1width () { - var currentValue, barWidth + var currentValue = 0.0, barWidth if (root.connection.powerL1 != undefined) - currentValue = root.connection.powerL1.valid ? root.connection.powerL1.value : 0 + currentValue += root.connection.powerL1.valid ? root.connection.powerL1.value : 0 else if (root.connection.power != undefined) - currentValue = root.connection.power.valid ? root.connection.power.value : 0 - else - currentValue = 0 + currentValue += root.connection.power.valid ? root.connection.power.value : 0 + if (includeConnection2 && root.connection2.powerL1 != undefined) + currentValue += root.connection2.powerL1.valid ? root.connection2.powerL1.value : 0 + else if (includeConnection2 && root.connection2.power != undefined) + currentValue += root.connection2.power.valid ? root.connection2.power.value : 0 if (reversePower) currentValue = -currentValue @@ -246,7 +258,10 @@ Item { { var currentValue, barWidth currentValue = root.connection.powerL2.valid ? root.connection.powerL2.value : 0 - if (reversePower) + if (includeConnection2) + currentValue += root.connection2.powerL2.valid ? root.connection2.powerL2.value : 0 + + if (reversePower) currentValue = -currentValue root.bar2color = getBarColor (currentValue) barWidth = Math.min ( Math.max (currentValue, -maxReverseDisplayed), maxForwardDisplayed) * scaleFactor @@ -267,7 +282,10 @@ Item { { var currentValue, barWidth currentValue = root.connection.powerL3.valid ? root.connection.powerL3.value : 0 - if (reversePower) + if (includeConnection2) + currentValue += root.connection2.powerL3.valid ? root.connection2.powerL3.value : 0 + + if (reversePower) currentValue = -currentValue root.bar3color = getBarColor (currentValue) barWidth = Math.min ( Math.max (currentValue, -maxReverseDisplayed), maxForwardDisplayed) * scaleFactor diff --git a/FileSets/v3.40~8/OverviewHubEnhanced.qml b/FileSets/v3.40~8/OverviewHubEnhanced.qml index 240ae6c4..c6ca2a4c 100644 --- a/FileSets/v3.40~8/OverviewHubEnhanced.qml +++ b/FileSets/v3.40~8/OverviewHubEnhanced.qml @@ -953,7 +953,6 @@ OverviewPage { } ] ////// add power bar graph -////// only shows one of possibly 3 PV inverter locations !!!!!!!!!!!!!!!!!!!!! PowerGauge { id: pvInverterBar @@ -964,15 +963,11 @@ OverviewPage { top: parent.top; topMargin: 19 horizontalCenter: parent.horizontalCenter } - maxForwardPowerParameter: - { - if (hasAcSolarOnOut) - return "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnOutputMaxPower" - else - return "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnGridMaxPower" - } - connection: hasAcSolarOnOut ? sys.pvOnAcOut : hasAcSolarOnAcIn1 ? sys.pvOnAcIn1 : sys.pvOnAcIn2 - visible: showGauges && showAcSolar && !showDcAndAcSolar + maxForwardPowerParameter: "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnOutputMaxPower" + maxForwardPowerParameter2: "com.victronenergy.settings/Settings/GuiMods/GaugeLimits/PvOnGridMaxPower" + connection: sys.pvOnAcOut + connection2: sys.pvOnGrid + visible: showGauges && showAcSolar } DetailTarget { id: pvInverterTarget; detailsPage: "DetailPvInverter.qml" } } diff --git a/FileSets/v3.40~8/PowerGauge.qml b/FileSets/v3.40~8/PowerGauge.qml index 91166066..bba63cad 100644 --- a/FileSets/v3.40~8/PowerGauge.qml +++ b/FileSets/v3.40~8/PowerGauge.qml @@ -13,24 +13,34 @@ Item { property bool darkMode: darkModeItem.valid && darkModeItem.value == 1 property variant connection + // connection2 accommodates combined PV inverter AC input and AC output + property variant connection2: undefined + property bool includeConnection2: connection2 != undefined property bool reversePower: false property bool useInputCurrentLimit: false property variant endLabelFontSize: 16 property color endLabelBackgroundColor: "transparent" - property int reportedPhaseCount: connection == undefined ? 0 : connection.phaseCount == undefined || ! connection.phaseCount.valid ? 1 : connection.phaseCount.value - property int phaseCount: reportedPhaseCount < 2 ? reportedPhaseCount : (connection.isAcOutput ? connection.l2AndL1OutSummed : connection.splitPhaseL2PassthruDisabled) ? 1 : connection.phaseCount.value + property int reportedPhaseCount1: connection == undefined ? 0 : connection.phaseCount == undefined || ! connection.phaseCount.valid ? 1 : connection.phaseCount.value + property int phaseCount1: reportedPhaseCount1 < 2 ? reportedPhaseCount1 : (connection.isAcOutput ? connection.l2AndL1OutSummed : connection.splitPhaseL2PassthruDisabled) ? 1 : connection.phaseCount.value - property string maxForwardPowerParameter: "" - VBusItem { id: maxForwardLimitItem; bind: root.maxForwardPowerParameter } + property int reportedPhaseCount2: connection2 == undefined ? 0 : connection2.phaseCount == undefined || ! connection2.phaseCount.valid ? 1 : connection2.phaseCount.value + property int phaseCount2: reportedPhaseCount2 < 2 ? reportedPhaseCount2 : (connection2.isAcOutput ? connection2.l2AndL1OutSummed : connection2.splitPhaseL2PassthruDisabled) ? 1 : connection2.phaseCount.value + + property int phaseCount: includeConnection2 ? Math.max (phaseCount1, phaseCount2) : phaseCount1 + + property string maxForwardPowerParameter: "" + VBusItem { id: maxForwardLimitItem; bind: root.maxForwardPowerParameter } + property string maxForwardPowerParameter2: "" + VBusItem { id: maxForwardLimitItem2; bind: root.maxForwardPowerParameter2 } property string maxReversePowerParameter: "" VBusItem { id: maxReverseLimitItem; bind: root.maxReversePowerParameter } property real inPowerLimit: sys.acInput.inCurrentLimit.valid ? sys.acInput.inCurrentLimit.value * sys.acInput.voltageL1.value : 0 - property real maxForwardLimit: useInputCurrentLimit ? inPowerLimit : maxForwardLimitItem.valid ? maxForwardLimitItem.value : 0 + property real maxForwardLimit: useInputCurrentLimit ? inPowerLimit : maxForwardLimitItem.valid ? maxForwardLimitItem.value : 0 + maxForwardLimitItem2.valid ? maxForwardLimitItem2.value : 0 property real maxReverseLimit: maxReverseLimitItem.valid ? maxReverseLimitItem.value : 0 // overload range is 10% of forward to reverse limits property real overload: (maxForwardLimit + maxReverseLimit) * 0.1 @@ -216,13 +226,15 @@ Item { function calculateBar1width () { - var currentValue, barWidth + var currentValue = 0.0, barWidth if (root.connection.powerL1 != undefined) - currentValue = root.connection.powerL1.valid ? root.connection.powerL1.value : 0 + currentValue += root.connection.powerL1.valid ? root.connection.powerL1.value : 0 else if (root.connection.power != undefined) - currentValue = root.connection.power.valid ? root.connection.power.value : 0 - else - currentValue = 0 + currentValue += root.connection.power.valid ? root.connection.power.value : 0 + if (includeConnection2 && root.connection2.powerL1 != undefined) + currentValue += root.connection2.powerL1.valid ? root.connection2.powerL1.value : 0 + else if (includeConnection2 && root.connection2.power != undefined) + currentValue += root.connection2.power.valid ? root.connection2.power.value : 0 if (reversePower) currentValue = -currentValue @@ -244,9 +256,12 @@ Item { } function calculateBar2width () { - var currentValue, barWidth - currentValue = root.connection.powerL2.valid ? root.connection.powerL2.value : 0 - if (reversePower) + var currentValue, barWidth + currentValue = root.connection.powerL2.valid ? root.connection.powerL2.value : 0 + if (includeConnection2) + currentValue += root.connection2.powerL2.valid ? root.connection2.powerL2.value : 0 + + if (reversePower) currentValue = -currentValue root.bar2color = getBarColor (currentValue) barWidth = Math.min ( Math.max (currentValue, -maxReverseDisplayed), maxForwardDisplayed) * scaleFactor @@ -266,8 +281,11 @@ Item { function calculateBar3width () { var currentValue, barWidth - currentValue = root.connection.powerL3.valid ? root.connection.powerL3.value : 0 - if (reversePower) + currentValue = root.connection.powerL3.valid ? root.connection.powerL3.value : 0 + if (includeConnection2) + currentValue += root.connection2.powerL3.valid ? root.connection2.powerL3.value : 0 + + if (reversePower) currentValue = -currentValue root.bar3color = getBarColor (currentValue) barWidth = Math.min ( Math.max (currentValue, -maxReverseDisplayed), maxForwardDisplayed) * scaleFactor diff --git a/changes b/changes index 30d75752..87bb3b25 100644 --- a/changes +++ b/changes @@ -1,3 +1,8 @@ +v10.28: + fixed: PV Inverter detail page not looking at phase count + fixed: PV Inverter detail page columns run together + fixed: PV Inverter tile does not always show correct gauge + v10.27: add support for v3.40~13 fixed: GuiMods Simple flow not showning tanks diff --git a/version b/version index 47354291..d93f6f26 100644 --- a/version +++ b/version @@ -1 +1 @@ -v10.27 +v10.28~1