Skip to content

Commit

Permalink
add support for v3.50
Browse files Browse the repository at this point in the history
  • Loading branch information
kwindrem committed Nov 2, 2024
1 parent a803553 commit fcc51d6
Show file tree
Hide file tree
Showing 358 changed files with 5,061 additions and 6,672 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/MbEditBox.qml-v3.50~3.orig 2024-07-18 14:31:06
+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/MbEditBox.qml-v3.50~3 2024-07-18 20:55:13
--- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/MbEditBox.qml-v3.50.orig 2024-07-18 14:31:06
+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/MbEditBox.qml-v3.50 2024-07-18 20:55:13
@@ -7,6 +7,10 @@
cornerMark: !readonly && !editMode
height: expanded.y + expanded.height + 1
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/MbItem.qml-v3.50~3.orig 2024-07-18 14:31:06
+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/MbItem.qml-v3.50~3 2024-07-18 20:58:40
--- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/MbItem.qml-v3.50.orig 2024-07-18 14:31:06
+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/MbItem.qml-v3.50 2024-07-18 20:58:40
@@ -14,6 +14,10 @@
height: defaultHeight
property bool show: user.accessLevel >= showAccessLevel
Expand Down
2 changes: 1 addition & 1 deletion FileSets/PatchSource/dbus_systemcalc.py-v3.14.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/dbus_systemcalc.py-v3.14.orig 2024-07-08 07:47:23
+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/dbus_systemcalc.py-v3.14 2023-12-02 07:35:03
+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/dbus_systemcalc.py-v3.14 2024-10-01 15:26:58
@@ -1,6 +1,8 @@
#!/usr/bin/python3 -u
# -*- coding: utf-8 -*-
Expand Down
2 changes: 1 addition & 1 deletion FileSets/PatchSource/dbus_systemcalc.py-v3.34.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/dbus_systemcalc.py-v3.34.orig 2024-07-08 07:47:23
+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/dbus_systemcalc.py-v3.34 2024-04-04 21:38:40
+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/dbus_systemcalc.py-v3.34 2024-10-01 15:26:58
@@ -1,6 +1,8 @@
#!/usr/bin/python3 -u
# -*- coding: utf-8 -*-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/dbus_systemcalc.py-v3.50~22.orig 2024-09-13 09:15:41
+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/dbus_systemcalc.py-v3.50~22 2024-09-17 15:22:37
--- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/dbus_systemcalc.py-v3.50.orig 2024-09-13 09:15:41
+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/dbus_systemcalc.py-v3.50 2024-10-01 15:26:58
@@ -1,6 +1,8 @@
#!/usr/bin/python3 -u
# -*- coding: utf-8 -*-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ PageStackWindow {
id: rootWindow

gpsConnected: gpsFix.value === 1
onCompletedChanged: checkAlarm()
onCompletedChanged: { checkAlarm(); showNewUiPopup() }
initialPage: PageMain {}

property VeQuickItem gpsService: VeQuickItem { uid: "dbus/com.victronenergy.system/GpsService" }
property VeQuickItem gpsFix: VeQuickItem { uid: Utils.path("dbus/", gpsService.value, "/Fix") }
property bool completed: false
property bool alarm: alarmNotification.valid ? alarmNotification.value : 0
property bool showAlert: alertNotification.valid ? alertNotification.value : 0
//////// added for GuiMods flow pages
property bool overviewsLoaded: defaultOverview.valid && generatorOverview.valid && mobileOverview.valid && tanksOverview.valid && startWithMenu.valid && mobileOverviewEnhanced.valid && guiModsFlowOverview.valid && generatorOverviewEnhanced.valid
//////// modified for GuiMods flow pages
property bool overviewsLoaded: defaultOverview.valid && generatorOverview.valid && mobileOverview.valid && tanksOverview.valid && startWithMenu.valid && mobileOverviewEnhanced.valid && guiModsFlowOverview.valid && generatorOverviewEnhanced.valid
property string bindPrefix: "com.victronenergy.settings"

property bool isNotificationPage: pageStack.currentPage && pageStack.currentPage.title === qsTr("Notifications")
property bool isOverviewPage: pageStack.currentPage && pageStack.currentPage.model === overviewModel;
property bool isOfflineFwUpdatePage: pageStack.currentPage && pageStack.currentPage.objectName === "offlineFwUpdatePage";

/////////////////////property bool hasGridMeter: theSystem.hasGridMeter
property bool hasVebusEss: ['ESS', 'Hub-4'].indexOf(theSystem.systemType.value) > -1
property bool showInputLoads: theSystem.acInLoad.power.valid && (hasVebusEss ? (theSystem.hasGridMeter && withoutGridMeter.value === 0) : theSystem.hasGridMeter)
property int newUiAnnouncementVersion: 2 // Increase to make the popup appear again

//////// modified for GuiMods pages
property string currentHubOverview: "OverviewHub.qml"
Expand Down Expand Up @@ -95,19 +95,19 @@ PageStackWindow {
}
}

VBusItem {
id: generatorOverview
bind: "com.victronenergy.settings/Settings/Relay/Function"
onValueChanged: selectGeneratorOverview ()
}

////// GuiMods
VBusItem
{
id: generatorOverviewEnhanced
bind: "com.victronenergy.settings/Settings/GuiMods/UseEnhancedGeneratorOverview"
onValueChanged: selectGeneratorOverview ()
}
////// end GuiMods

VBusItem {
id: generatorOverview
bind: "com.victronenergy.settings/Settings/Relay/Function"
onValueChanged: extraOverview("OverviewGeneratorRelay.qml", value === 1)
}

VBusItem {
bind: "com.victronenergy.generator.startstop1/GensetProductId"
Expand All @@ -117,7 +117,7 @@ PageStackWindow {

// Show generic overview for ComAp and DSE
extraOverview("OverviewGeneratorOther.qml",
[0xB044, 0xB046, 0xB048, 0xB049].indexOf(value) > -1)
[0xB044, 0xB046, 0xB048, 0xB049].indexOf(value) > -1)

// Switch to FP overview in case it is the default one
if (isOverviewPage) {
Expand Down Expand Up @@ -153,7 +153,7 @@ PageStackWindow {
}
}

//////// handle OverviewMobileEnhanced page
//////// GuiMods handle OverviewMobileEnhanced page
VBusItem
{
id: mobileOverview
Expand Down Expand Up @@ -218,13 +218,13 @@ PageStackWindow {
onValueChanged: extraOverview ("OverviewTanksTempsDigInputs.qml", value === 1)
}

VBusItem {
id: tanksOverview
bind: "com.victronenergy.settings/Settings/Gui/TanksOverview"
onValueChanged:{
extraOverview("OverviewTanks.qml", value === 1)
}
}
VBusItem {
id: tanksOverview
bind: "com.victronenergy.settings/Settings/Gui/TanksOverview"
onValueChanged:{
extraOverview("OverviewTanks.qml", value === 1)
}
}

VBusItem {
id: startWithMenu
Expand Down Expand Up @@ -261,6 +261,11 @@ PageStackWindow {
bind: "com.victronenergy.platform/Notifications/Alarm"
}

VBusItem {
id: newUiAnnouncement
bind: "com.victronenergy.settings/Settings/Gui/NewGuiLastAnnouncement"
}

// Note: finding a firmware image on the storage device is error 4 for vrm storage
// since it should not be used for logging. That fact is used here to determine if
// there is a firmware image.
Expand Down Expand Up @@ -353,73 +358,76 @@ PageStackWindow {
}
}

Item {
anchors.verticalCenter: parent.verticalCenter
height: mbTools.height
width: mbTools.width - pagesItem.width - menusItem.width - centerScrollIndicator.width
Item {
anchors.verticalCenter: parent.verticalCenter
anchors.left: mbTools.left
height: mbTools.height
width: 200

MouseArea {
anchors.fill: parent
onClicked: {
if (pageStack.currentPage)
pageStack.currentPage.toolbarHandler.leftAction(true)
}
}

MouseArea
{
anchors.fill: parent
onClicked:
{
if (darkModeItem.valid)
darkModeItem.setValue (! darkMode)
}
Row {
anchors.centerIn: parent

MbIcon {
anchors.verticalCenter: parent.verticalCenter
iconId: pageStack.currentPage ? pageStack.currentPage.leftIcon : ""
}

Text
{
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
text: qsTr ("change to") + "\n" + (darkMode ? qsTr ("Light mode") : qsTr ("Dark mode"))
Text {
anchors.verticalCenter: parent.verticalCenter
text: pageStack.currentPage ? pageStack.currentPage.leftText : ""
color: "white"
font.bold: true
font.pixelSize: 12
visible: darkModeItem.valid
}
}
Item
{
id: centerScrollIndicator
anchors.verticalCenter: parent.verticalCenter
height: mbTools.height
width: 20
MbIcon {
anchors.verticalCenter: parent.verticalCenter
iconId: pageStack.currentPage ? pageStack.currentPage.scrollIndicator : ""
font.pixelSize: 16
}
}
}

Item {
id: menusItem
anchors.verticalCenter: parent.verticalCenter
height: mbTools.height
width: pagesItem.width
MbIcon {
id: centerScrollIndicator

MouseArea {
anchors.fill: parent
onClicked: {
if (pageStack.currentPage)
pageStack.currentPage.toolbarHandler.rightAction(true)
}
anchors {
horizontalCenter: parent.horizontalCenter
verticalCenter: mbTools.verticalCenter
}
iconId: pageStack.currentPage ? pageStack.currentPage.scrollIndicator : ""
}

Item {
anchors.verticalCenter: parent.verticalCenter
height: mbTools.height
anchors.right: mbTools.right
width: 200

MouseArea {
anchors.fill: parent
onClicked: {
if (pageStack.currentPage)
pageStack.currentPage.toolbarHandler.rightAction(true)
}
}

Row {
anchors.centerIn: parent
Row {
anchors.centerIn: parent

MbIcon {
iconId: pageStack.currentPage ? pageStack.currentPage.rightIcon : ""
anchors.verticalCenter: parent.verticalCenter
}
MbIcon {
iconId: pageStack.currentPage ? pageStack.currentPage.rightIcon : ""
anchors.verticalCenter: parent.verticalCenter
}

Text {
text: pageStack.currentPage ? pageStack.currentPage.rightText : ""
anchors.verticalCenter: parent.verticalCenter
color: "white"
font.bold: true
font.pixelSize: 16
}
Text {
text: pageStack.currentPage ? pageStack.currentPage.rightText : ""
anchors.verticalCenter: parent.verticalCenter
color: "white"
font.bold: true
font.pixelSize: 16
}
}
}
Expand Down Expand Up @@ -456,6 +464,13 @@ PageStackWindow {
Timer {
interval: 2000
running: completed && overviewsLoaded && startWithMenu.valid
onTriggered: if (startWithMenu.value === 0) showOverview()
}

Timer {
id: newUiPopupTimer
interval: 10000
running: false
onTriggered:
{
//// GuiMods - modified for OverviewGridParallelEnhanced page
Expand All @@ -464,6 +479,14 @@ PageStackWindow {
}
}

function showNewUiPopup()
{
var announce = newUiAnnouncement.value < newUiAnnouncementVersion
if (announce && vePlatform.isGuiv2Installed() && vePlatform.displayPresent()) {
newUiPopupTimer.start()
}
}

function getDefaultOverviewIndex()
{
if(!defaultOverview.valid)
Expand All @@ -484,7 +507,11 @@ PageStackWindow {
Component {
id: offlineFwUpdates
PageSettingsFirmwareOffline { checkOnCompleted: true}
}

Component {
id: popupNewUi
PopupNewUi { version: newUiAnnouncementVersion }
}

// Add or remove extra overviews. for example, generator overview
Expand Down Expand Up @@ -530,6 +557,7 @@ PageStackWindow {
overviewModel.append({"pageSource": newPage})
}


// Central mover for the ball animation on the overviews
// Instead of using a timer per line, using a central one
// reduces the CPU usage a little bit and makes the animations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PageStackWindow {
id: rootWindow

gpsConnected: gpsFix.value === 1
onCompletedChanged: checkAlarm()
onCompletedChanged: { checkAlarm(); showNewUiPopup() }
initialPage: PageMain {}

property VeQuickItem gpsService: VeQuickItem { uid: "dbus/com.victronenergy.system/GpsService" }
Expand All @@ -25,6 +25,7 @@ PageStackWindow {

property bool hasVebusEss: ['ESS', 'Hub-4'].indexOf(theSystem.systemType.value) > -1
property bool showInputLoads: theSystem.acInLoad.power.valid && (hasVebusEss ? (theSystem.hasGridMeter && withoutGridMeter.value === 0) : theSystem.hasGridMeter)
property int newUiAnnouncementVersion: 2 // Increase to make the popup appear again

// Keep track of the current view (menu/overview) to show as default next time the
// CCGX is restarted
Expand Down Expand Up @@ -112,6 +113,11 @@ PageStackWindow {
bind: "com.victronenergy.platform/Notifications/Alarm"
}

VBusItem {
id: newUiAnnouncement
bind: "com.victronenergy.settings/Settings/Gui/NewGuiLastAnnouncement"
}

// Note: finding a firmware image on the storage device is error 4 for vrm storage
// since it should not be used for logging. That fact is used here to determine if
// there is a firmware image.
Expand Down Expand Up @@ -274,6 +280,21 @@ PageStackWindow {
onTriggered: if (startWithMenu.value === 0) showOverview()
}

Timer {
id: newUiPopupTimer
interval: 10000
running: false
onTriggered: rootWindow.pageStack.push(popupNewUi)
}

function showNewUiPopup()
{
var announce = newUiAnnouncement.value < newUiAnnouncementVersion
if (announce && vePlatform.isGuiv2Installed() && vePlatform.displayPresent()) {
newUiPopupTimer.start()
}
}

function getDefaultOverviewIndex()
{
if(!defaultOverview.valid)
Expand All @@ -296,6 +317,11 @@ PageStackWindow {
PageSettingsFirmwareOffline { checkOnCompleted: true}
}

Component {
id: popupNewUi
PopupNewUi { version: newUiAnnouncementVersion }
}

// Add or remove extra overviews. for example, generator overview
// shouldn't be shown if the start/stop functionality is not enabled.
// Index parameter is optional, usefull to keep an order.
Expand Down
Loading

0 comments on commit fcc51d6

Please sign in to comment.