Skip to content

Commit

Permalink
hide multi tile if no inverter
Browse files Browse the repository at this point in the history
  • Loading branch information
kwindrem committed Jun 13, 2024
1 parent 27a4883 commit 9f05ff0
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 35 deletions.
16 changes: 10 additions & 6 deletions FileSets/v2.73/OverviewHubEnhanced.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ OverviewPage {
property double alternatorFlow: showAlternator ? noNoise (sys.alternator.power) : 0
property bool showAcLoads: isMulti || sys.acLoad.power.valid || veDirectInverterService != ""
property bool showDcSystem: (hasDcSystemItem.valid && hasDcSystemItem.value > 0) || showAllTiles
property bool showInverter: inverterService != "" || showAllTiles

property bool hasAcSolarOnAcIn1: sys.pvOnAcIn1.power.valid
property bool hasAcSolarOnAcIn2: sys.pvOnAcIn2.power.valid
property bool hasAcSolarOnIn: hasAcSolarOnAcIn1 || hasAcSolarOnAcIn2
Expand Down Expand Up @@ -327,6 +329,7 @@ OverviewPage {
top: parent.top; topMargin: 3
}
inverterService: root.inverterService
visible: showInverter
////// add power bar graph
PowerGaugeMulti
{
Expand All @@ -339,7 +342,7 @@ OverviewPage {
horizontalCenter: parent.horizontalCenter
}
inverterService: root.inverterService
show: showGauges
visible: showGauges && showInverter
}
DetailTarget { id: multiTarget; detailsPage: "DetailInverter.qml"; width: 60; height: 60 }
}
Expand All @@ -358,6 +361,7 @@ OverviewPage {
{
text: wallClock.time
font.pixelSize: 18
color: showInverter || darkMode ? "white" : "black"
anchors
{
top: multi.top; topMargin: 96
Expand Down Expand Up @@ -919,7 +923,7 @@ OverviewPage {
visible: showAcInput
ballCount: 2
path: straight
active: root.active
active: root.active && showAcInput && showInverter
value: flow(sys.acInput ? sys.acInput.power : 0)

anchors {
Expand All @@ -932,7 +936,7 @@ OverviewPage {
id: multiToAcLoads
ballCount: 2
path: straight
active: root.active && ( showAcLoads || showAllTiles )
active: root.active && ( showAcLoads && showInverter )
value: flow(sys.acLoad.power)

anchors {
Expand Down Expand Up @@ -971,7 +975,7 @@ OverviewPage {
id: dcBus2
ballCount: 2
path: straight
active: root.active
active: root.active && ( showInverter || showDcSolar )
value: -Utils.sign (noNoise (sys.pvCharger.power) + noNoise (sys.vebusDc.power))
startPointVisible: false
endPointVisible: false
Expand Down Expand Up @@ -1007,7 +1011,7 @@ OverviewPage {
id: multiToDcConnect
ballCount: showTanksTemps ? 2 : 4
path: straight
active: root.active
active: root.active && showInverter
value: -flow(sys.vebusDc.power);
startPointVisible: false

Expand Down Expand Up @@ -1041,7 +1045,7 @@ OverviewPage {
id: batteryToDcBus2
ballCount: 1
path: straight
active: root.active
active: root.active && ( showInverter || showDcSolar )
value: Utils.sign(noNoise(sys.pvCharger.power) + noNoise(sys.vebusDc.power) + alternatorFlow)
startPointVisible: false

Expand Down
5 changes: 3 additions & 2 deletions FileSets/v3.01/OverviewFlowComplex.qml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ OverviewPage {
MultiEnhancedGP {
id: multi
iconId: "overview-inverter-short"
visible: showInverter
anchors {
horizontalCenter: parent.horizontalCenter
top: acInBox.top
Expand All @@ -373,14 +374,14 @@ OverviewPage {
horizontalCenter: multi.horizontalCenter
}
inverterService: root.inverterService
visible: showGauges
visible: showGauges && showInverter
}
DetailTarget { id: multiTarget; detailsPage: "DetailInverter.qml"; width: 60; height: 60 }
}
TileText
{
text: wallClock.time
color: "white"
color: showInverter || darkMode ? "white" : "black"
width: inOutTileWidth
wrapMode: Text.WordWrap
font.pixelSize: 16
Expand Down
17 changes: 10 additions & 7 deletions FileSets/v3.01/OverviewHubEnhanced.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ OverviewPage {
property double alternatorFlow: showAlternator ? noNoise (sys.alternator.power) : 0
property bool showAcLoads: isMulti || sys.acLoad.power.valid || veDirectInverterService != ""
property bool showDcSystem: (hasDcSystemItem.valid && hasDcSystemItem.value > 0) || showAllTiles
property bool showInverter: inverterService != "" || showAllTiles

property bool hasAcSolarOnAcIn1: sys.pvOnAcIn1.power.valid
property bool hasAcSolarOnAcIn2: sys.pvOnAcIn2.power.valid
Expand Down Expand Up @@ -335,6 +336,7 @@ OverviewPage {
horizontalCenter: parent.horizontalCenter
top: parent.top; topMargin: 3
}
visible: showInverter
inverterService: root.inverterService
////// add power bar graph
PowerGaugeMulti
Expand All @@ -348,7 +350,7 @@ OverviewPage {
horizontalCenter: parent.horizontalCenter
}
inverterService: root.inverterService
visible: showGauges
visible: showGauges && showInverter
}
DetailTarget { id: multiTarget; detailsPage: "DetailInverter.qml"; width: 60; height: 60 }
}
Expand All @@ -367,6 +369,7 @@ OverviewPage {
{
text: wallClock.time
font.pixelSize: 18
color: showInverter || darkMode ? "white" : "black"
anchors
{
top: multi.top; topMargin: 96
Expand Down Expand Up @@ -980,7 +983,7 @@ OverviewPage {
visible: showAcInput
ballCount: 2
path: straight
active: root.active
active: root.active && showAcInput && showInverter
value: flow(sys.acInput ? sys.acInput.power : 0)

anchors {
Expand All @@ -993,7 +996,7 @@ OverviewPage {
id: multiToAcLoads
ballCount: 2
path: straight
active: root.active && ( showAcLoads || showAllTiles )
active: root.active && ( showAcLoads && showInverter )
value: flow(sys.acLoad.power)

anchors {
Expand All @@ -1007,7 +1010,7 @@ OverviewPage {
id: pvInverterToMulti
ballCount: 3
path: corner
active: root.active && showAcSolar
active: root.active && showAcSolar && showInverter
value: Utils.sign(noNoise(sys.pvOnAcOut.power) + noNoise(sys.pvOnAcIn1.power) + noNoise(sys.pvOnAcIn2.power))

anchors {
Expand All @@ -1032,7 +1035,7 @@ OverviewPage {
id: dcBus2
ballCount: 2
path: straight
active: root.active
active: root.active && ( showInverter || showDcSolar )
value: -Utils.sign (noNoise (sys.pvCharger.power) + noNoise (sys.vebusDc.power))
startPointVisible: false
endPointVisible: false
Expand Down Expand Up @@ -1068,7 +1071,7 @@ OverviewPage {
id: multiToDcConnect
ballCount: showTanksTemps ? 2 : 4
path: straight
active: root.active
active: root.active && showInverter
value: -flow(sys.vebusDc.power);
startPointVisible: false

Expand Down Expand Up @@ -1102,7 +1105,7 @@ OverviewPage {
id: batteryToDcBus2
ballCount: 1
path: straight
active: root.active
active: root.active && ( showInverter || showDcSolar )
value: Utils.sign(noNoise(sys.pvCharger.power) + noNoise(sys.vebusDc.power) + alternatorFlow)
startPointVisible: false

Expand Down
5 changes: 3 additions & 2 deletions FileSets/v3.40~26/OverviewFlowComplex.qml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ OverviewPage {
MultiEnhancedGP {
id: multi
iconId: "overview-inverter-short"
visible: showInverter
anchors {
horizontalCenter: parent.horizontalCenter
top: acInBox.top
Expand All @@ -373,14 +374,14 @@ OverviewPage {
horizontalCenter: multi.horizontalCenter
}
inverterService: root.inverterService
visible: showGauges
visible: showGauges && showInverter
}
DetailTarget { id: multiTarget; detailsPage: "DetailInverter.qml"; width: 60; height: 60 }
}
TileText
{
text: wallClock.time
color: "white"
color: showInverter || darkMode ? "white" : "black"
width: inOutTileWidth
wrapMode: Text.WordWrap
font.pixelSize: 16
Expand Down
18 changes: 10 additions & 8 deletions FileSets/v3.40~26/OverviewHubEnhanced.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ OverviewPage {
property double alternatorFlow: showAlternator ? noNoise (sys.alternator.power) : 0
property bool showAcLoads: isMulti || sys.acLoad.power.valid || veDirectInverterService != ""
property bool showDcSystem: (hasDcSystemItem.valid && hasDcSystemItem.value > 0) || showAllTiles
property bool showInverter: inverterService != "" || showAllTiles

property bool hasAcSolarOnAcIn1: sys.pvOnAcIn1.power.valid
property bool hasAcSolarOnAcIn2: sys.pvOnAcIn2.power.valid
Expand Down Expand Up @@ -335,6 +336,7 @@ OverviewPage {
top: parent.top; topMargin: 3
}
inverterService: root.inverterService
visible: showInverter
////// add power bar graph
PowerGaugeMulti
{
Expand All @@ -347,7 +349,7 @@ OverviewPage {
horizontalCenter: parent.horizontalCenter
}
inverterService: root.inverterService
visible: showGauges
visible: showGauges && showInverter
}
DetailTarget { id: multiTarget; detailsPage: "DetailInverter.qml"; width: 60; height: 60 }
}
Expand All @@ -366,6 +368,7 @@ OverviewPage {
{
text: wallClock.time
font.pixelSize: 18
color: showInverter || darkMode ? "white" : "black"
anchors
{
top: multi.top; topMargin: 96
Expand Down Expand Up @@ -974,10 +977,9 @@ OverviewPage {

OverviewConnection {
id: acInToMulti
visible: showAcInput
ballCount: 2
path: straight
active: root.active
active: root.active && showAcInput && showInverter
value: flow(sys.acInput ? sys.acInput.power : 0)

anchors {
Expand All @@ -990,7 +992,7 @@ OverviewPage {
id: multiToAcLoads
ballCount: 2
path: straight
active: root.active && ( showAcLoads || showAllTiles )
active: root.active && ( showAcLoads && showInverter )
value: flow(sys.acLoad.power)

anchors {
Expand All @@ -1004,7 +1006,7 @@ OverviewPage {
id: pvInverterToMulti
ballCount: 3
path: corner
active: root.active && showAcSolar
active: root.active && showAcSolar && showInverter
value: Utils.sign(noNoise(sys.pvOnAcOut.power) + noNoise(sys.pvOnAcIn1.power) + noNoise(sys.pvOnAcIn2.power))

anchors {
Expand All @@ -1029,7 +1031,7 @@ OverviewPage {
id: dcBus2
ballCount: 2
path: straight
active: root.active
active: root.active && ( showInverter || showDcSolar )
value: -Utils.sign (noNoise (sys.pvCharger.power) + noNoise (sys.inverterChargerDc.power))
startPointVisible: false
endPointVisible: false
Expand Down Expand Up @@ -1065,7 +1067,7 @@ OverviewPage {
id: multiToDcConnect
ballCount: showTanksTemps ? 2 : 4
path: straight
active: root.active
active: root.active && showInverter
value: -flow(sys.inverterChargerDc.power);
startPointVisible: false

Expand Down Expand Up @@ -1099,7 +1101,7 @@ OverviewPage {
id: batteryToDcBus2
ballCount: 1
path: straight
active: root.active
active: root.active && ( showInverter || showDcSolar )
value: Utils.sign(noNoise(sys.pvCharger.power) + noNoise(sys.inverterChargerDc.power) + alternatorFlow)
startPointVisible: false

Expand Down
5 changes: 3 additions & 2 deletions FileSets/v3.40~8/OverviewFlowComplex.qml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ OverviewPage {
MultiEnhancedGP {
id: multi
iconId: "overview-inverter-short"
visible: showInverter
anchors {
horizontalCenter: parent.horizontalCenter
top: acInBox.top
Expand All @@ -373,14 +374,14 @@ OverviewPage {
horizontalCenter: multi.horizontalCenter
}
inverterService: root.inverterService
visible: showGauges
visible: showGauges && showInverter
}
DetailTarget { id: multiTarget; detailsPage: "DetailInverter.qml"; width: 60; height: 60 }
}
TileText
{
text: wallClock.time
color: "white"
color: showInverter || darkMode ? "white" : "black"
width: inOutTileWidth
wrapMode: Text.WordWrap
font.pixelSize: 16
Expand Down
Loading

0 comments on commit 9f05ff0

Please sign in to comment.