diff --git a/FileSets/PatchSource/PageMain.qml-v2.94 b/FileSets/PatchSource/PageMain.qml-v2.94 new file mode 100644 index 00000000..97c5ce73 --- /dev/null +++ b/FileSets/PatchSource/PageMain.qml-v2.94 @@ -0,0 +1,281 @@ +//////// modified order to put Settings, then Notifications at top of list + +import QtQuick 1.1 +import "utils.js" as Utils +import com.victron.velib 1.0 + +MbPage { + id: root + title: qsTr("Device List") + property VBusItem moveSettings: VBusItem { id: moveSettings; bind: Utils.path("com.victronenergy.settings", "/Settings/GuiMods/MoveSettings")} + property bool settingsAtTop: moveSettings.valid && moveSettings.value === 1 + + model: VisualModels { +//////// put Settings at top of list + VisualItemModel { //////// use VisualItemModel below for v2.93 and earlier + MbSubMenu { + description: qsTr("Settings") + subpage: Component { PageSettings {} } + show: settingsAtTop + } + +//////// put Notifications second + MbSubMenu { + id: menuNotificationsTop + description: qsTr("Notifications") + item: VBusItem { + property variant active: NotificationCenter.notifications.filter( + function isActive(obj) { return obj.active} ) + value: active.length > 0 ? active.length : "" + } + subpage: Component { PageNotifications {} } + show: settingsAtTop + } + + MbOK { + description: qsTr("Remove disconnected devices") + value: qsTr("Press to remove") + show: settingsAtTop && deviceList.disconnectedDevices != 0 + editable: true + + function clicked() { + listview.decrementCurrentIndex() + deviceList.removeDisconnected() + } + } + } + VisualDataModel { + model: VeSortFilterProxyModel { + model: DeviceList { + id: deviceList + onRowsAboutToBeRemoved: { + for (var i = first; i <= last; i++) + deviceList.page(i).destroy() + } + } + sortRole: DeviceList.DescriptionRole + dynamicSortFilter: true + naturalSort: true + sortCaseSensitivity: Qt.CaseInsensitive + } + + delegate: MbDevice { + iconId: "icon-toolbar-enter" + service: model.page.service + subpage: model.page + } + } + + VisualItemModel { //////// use VisualItemModel below for v2.93 and earlier + MbSubMenu { + id: menuNotifications + description: qsTr("Notifications") + item: VBusItem { + property variant active: NotificationCenter.notifications.filter( + function isActive(obj) { return obj.active} ) + value: active.length > 0 ? active.length : "" + } + subpage: Component { PageNotifications {} } + show: !settingsAtTop + } + + MbSubMenu { + description: qsTr("Settings") + subpage: Component { PageSettings {} } + show: !settingsAtTop + } + + MbOK { + description: qsTr("Remove disconnected devices") + value: qsTr("Press to remove") + show: !settingsAtTop && deviceList.disconnectedDevices != 0 + editable: true + + function clicked() { + listview.decrementCurrentIndex() + deviceList.removeDisconnected() + } + } + } + } + + Component { + id: vebusPage + PageVebus {} + } + + Component { + id: multiRsPage + PageMultiRs {} + } + + Component { + id: batteryPage + PageBattery {} + } + + Component { + id: solarChargerPage + PageSolarCharger {} + } + + Component { + id: acInPage + PageAcIn {} + } + + Component { + id: acChargerPage + PageAcCharger {} + } + + Component { + id: tankPage + PageTankSensor {} + } + + Component { + id: motorDrivePage + PageMotorDrive {} + } + + Component { + id: inverterPage + PageInverter {} + } + + Component { + id: pulseCounterPage + PagePulseCounter {} + } + + Component { + id: digitalInputPage + PageDigitalInput {} + } + + Component { + id: temperatureSensorPage + PageTemperatureSensor {} + } + + Component { + id: unsupportedDevicePage + PageUnsupportedDevice {} + } + + Component { + id: meteoDevicePage + PageMeteo {} + } + + Component { + id: evChargerPage + PageEvCharger {} + } + + Component { + id: dcMeterPage + PageDcMeter {} + } + + Component { + id: alternatorPage + PageAlternator {} + } + + function addService(service) + { + var name = service.name + + var page + switch(service.type) + { + case DBusService.DBUS_SERVICE_MULTI: + page = vebusPage + break; + case DBusService.DBUS_SERVICE_MULTI_RS: + page = multiRsPage + break; + case DBusService.DBUS_SERVICE_BATTERY: + page = batteryPage + break; + case DBusService.DBUS_SERVICE_SOLAR_CHARGER: + page = solarChargerPage + break; + case DBusService.DBUS_SERVICE_PV_INVERTER: + page = acInPage + break; + case DBusService.DBUS_SERVICE_AC_CHARGER: + page = acChargerPage + break; + case DBusService.DBUS_SERVICE_TANK: + page = tankPage + break; + case DBusService.DBUS_SERVICE_GRIDMETER: + page = acInPage + break + case DBusService.DBUS_SERVICE_GENSET: + page = acInPage + break + case DBusService.DBUS_SERVICE_MOTOR_DRIVE: + page = motorDrivePage + break + case DBusService.DBUS_SERVICE_INVERTER: + page = inverterPage + break; + case DBusService.DBUS_SERVICE_TEMPERATURE_SENSOR: + page = temperatureSensorPage + break; + case DBusService.DBUS_SERVICE_SYSTEM_CALC: + return; + case DBusService.DBUS_SERVICE_DIGITAL_INPUT: + page = digitalInputPage + break; + case DBusService.DBUS_SERVICE_PULSE_COUNTER: + page = pulseCounterPage + break; + case DBusService.DBUS_SERVICE_UNSUPPORTED: + page = unsupportedDevicePage + break; + case DBusService.DBUS_SERVICE_METEO: + page = meteoDevicePage + break; + case DBusService.DBUS_SERVICE_VECAN: + return; + case DBusService.DBUS_SERVICE_EVCHARGER: + page = evChargerPage + break + case DBusService.DBUS_SERVICE_ACLOAD: + page = acInPage + break + case DBusService.DBUS_SERVICE_HUB4: + return; + case DBusService.DBUS_SERVICE_FUELCELL: + case DBusService.DBUS_SERVICE_DCSOURCE: + case DBusService.DBUS_SERVICE_DCLOAD: + case DBusService.DBUS_SERVICE_DCSYSTEM: + page = dcMeterPage + break + case DBusService.DBUS_SERVICE_ALTERNATOR: + page = alternatorPage + break + default: + console.log("unknown service " + name) + return; + } + + deviceList.append(service, page.createObject(root, {service: service, bindPrefix: service.name})) + initListView() + } + + Component.onCompleted: { + for (var i = 0; i < DBusServices.count; i++) + addService(DBusServices.at(i)) + } + + Connections { + target: DBusServices + onDbusServiceFound: addService(service) + } +} diff --git a/FileSets/PatchSource/PageMain.qml-v2.94.orig b/FileSets/PatchSource/PageMain.qml-v2.94.orig new file mode 100644 index 00000000..a82f35c5 --- /dev/null +++ b/FileSets/PatchSource/PageMain.qml-v2.94.orig @@ -0,0 +1,240 @@ +import QtQuick 1.1 +import com.victron.velib 1.0 + +MbPage { + id: root + title: qsTr("Device List") + + model: VisualModels { + VisualDataModel { + model: VeSortFilterProxyModel { + model: DeviceList { + id: deviceList + onRowsAboutToBeRemoved: { + for (var i = first; i <= last; i++) + deviceList.page(i).destroy() + } + } + sortRole: DeviceList.DescriptionRole + dynamicSortFilter: true + naturalSort: true + sortCaseSensitivity: Qt.CaseInsensitive + } + + delegate: MbDevice { + iconId: "icon-toolbar-enter" + service: model.page.service + subpage: model.page + } + } + VisualItemModel { + MbSubMenu { + id: menuNotifications + description: qsTr("Notifications") + item: VBusItem { + property variant active: NotificationCenter.notifications.filter( + function isActive(obj) { return obj.active} ) + value: active.length > 0 ? active.length : "" + } + subpage: Component { PageNotifications {} } + } + + MbSubMenu { + description: qsTr("Settings") + subpage: Component { PageSettings {} } + } + + MbOK { + description: qsTr("Remove disconnected devices") + value: qsTr("Press to remove") + show: deviceList.disconnectedDevices != 0 + editable: true + + function clicked() { + listview.decrementCurrentIndex() + deviceList.removeDisconnected() + } + } + } + } + + Component { + id: vebusPage + PageVebus {} + } + + Component { + id: multiRsPage + PageMultiRs {} + } + + Component { + id: batteryPage + PageBattery {} + } + + Component { + id: solarChargerPage + PageSolarCharger {} + } + + Component { + id: acInPage + PageAcIn {} + } + + Component { + id: acChargerPage + PageAcCharger {} + } + + Component { + id: tankPage + PageTankSensor {} + } + + Component { + id: motorDrivePage + PageMotorDrive {} + } + + Component { + id: inverterPage + PageInverter {} + } + + Component { + id: pulseCounterPage + PagePulseCounter {} + } + + Component { + id: digitalInputPage + PageDigitalInput {} + } + + Component { + id: temperatureSensorPage + PageTemperatureSensor {} + } + + Component { + id: unsupportedDevicePage + PageUnsupportedDevice {} + } + + Component { + id: meteoDevicePage + PageMeteo {} + } + + Component { + id: evChargerPage + PageEvCharger {} + } + + Component { + id: dcMeterPage + PageDcMeter {} + } + + Component { + id: alternatorPage + PageAlternator {} + } + + function addService(service) + { + var name = service.name + + var page + switch(service.type) + { + case DBusService.DBUS_SERVICE_MULTI: + page = vebusPage + break; + case DBusService.DBUS_SERVICE_MULTI_RS: + page = multiRsPage + break; + case DBusService.DBUS_SERVICE_BATTERY: + page = batteryPage + break; + case DBusService.DBUS_SERVICE_SOLAR_CHARGER: + page = solarChargerPage + break; + case DBusService.DBUS_SERVICE_PV_INVERTER: + page = acInPage + break; + case DBusService.DBUS_SERVICE_AC_CHARGER: + page = acChargerPage + break; + case DBusService.DBUS_SERVICE_TANK: + page = tankPage + break; + case DBusService.DBUS_SERVICE_GRIDMETER: + page = acInPage + break + case DBusService.DBUS_SERVICE_GENSET: + page = acInPage + break + case DBusService.DBUS_SERVICE_MOTOR_DRIVE: + page = motorDrivePage + break + case DBusService.DBUS_SERVICE_INVERTER: + page = inverterPage + break; + case DBusService.DBUS_SERVICE_TEMPERATURE_SENSOR: + page = temperatureSensorPage + break; + case DBusService.DBUS_SERVICE_SYSTEM_CALC: + return; + case DBusService.DBUS_SERVICE_DIGITAL_INPUT: + page = digitalInputPage + break; + case DBusService.DBUS_SERVICE_PULSE_COUNTER: + page = pulseCounterPage + break; + case DBusService.DBUS_SERVICE_UNSUPPORTED: + page = unsupportedDevicePage + break; + case DBusService.DBUS_SERVICE_METEO: + page = meteoDevicePage + break; + case DBusService.DBUS_SERVICE_VECAN: + return; + case DBusService.DBUS_SERVICE_EVCHARGER: + page = evChargerPage + break + case DBusService.DBUS_SERVICE_ACLOAD: + page = acInPage + break + case DBusService.DBUS_SERVICE_HUB4: + return; + case DBusService.DBUS_SERVICE_FUELCELL: + case DBusService.DBUS_SERVICE_DCSOURCE: + case DBusService.DBUS_SERVICE_DCLOAD: + case DBusService.DBUS_SERVICE_DCSYSTEM: + page = dcMeterPage + break + case DBusService.DBUS_SERVICE_ALTERNATOR: + page = alternatorPage + break + default: + console.log("unknown service " + name) + return; + } + + deviceList.append(service, page.createObject(root, {service: service, bindPrefix: service.name})) + initListView() + } + + Component.onCompleted: { + for (var i = 0; i < DBusServices.count; i++) + addService(DBusServices.at(i)) + } + + Connections { + target: DBusServices + onDbusServiceFound: addService(service) + } +} diff --git a/FileSets/PatchSource/PageMain.qml-v2.94.patch b/FileSets/PatchSource/PageMain.qml-v2.94.patch new file mode 100644 index 00000000..4209a340 --- /dev/null +++ b/FileSets/PatchSource/PageMain.qml-v2.94.patch @@ -0,0 +1,120 @@ +--- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/PageMain.qml-v2.94.orig 2024-06-23 12:13:50 ++++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/PageMain.qml-v2.94 2024-07-09 10:17:55 +@@ -1,11 +1,49 @@ ++//////// modified order to put Settings, then Notifications at top of list ++ + import QtQuick 1.1 ++import "utils.js" as Utils + import com.victron.velib 1.0 + + MbPage { + id: root + title: qsTr("Device List") ++ property VBusItem moveSettings: VBusItem { id: moveSettings; bind: Utils.path("com.victronenergy.settings", "/Settings/GuiMods/MoveSettings")} ++ property bool settingsAtTop: moveSettings.valid && moveSettings.value === 1 + + model: VisualModels { ++//////// put Settings at top of list ++ VisualItemModel { //////// use VisualItemModel below for v2.93 and earlier ++ MbSubMenu { ++ description: qsTr("Settings") ++ subpage: Component { PageSettings {} } ++ show: settingsAtTop ++ } ++ ++//////// put Notifications second ++ MbSubMenu { ++ id: menuNotificationsTop ++ description: qsTr("Notifications") ++ item: VBusItem { ++ property variant active: NotificationCenter.notifications.filter( ++ function isActive(obj) { return obj.active} ) ++ value: active.length > 0 ? active.length : "" ++ } ++ subpage: Component { PageNotifications {} } ++ show: settingsAtTop ++ } ++ ++ MbOK { ++ description: qsTr("Remove disconnected devices") ++ value: qsTr("Press to remove") ++ show: settingsAtTop && deviceList.disconnectedDevices != 0 ++ editable: true ++ ++ function clicked() { ++ listview.decrementCurrentIndex() ++ deviceList.removeDisconnected() ++ } ++ } ++ } + VisualDataModel { + model: VeSortFilterProxyModel { + model: DeviceList { +@@ -27,37 +65,40 @@ + subpage: model.page + } + } +- VisualItemModel { +- MbSubMenu { +- id: menuNotifications +- description: qsTr("Notifications") +- item: VBusItem { +- property variant active: NotificationCenter.notifications.filter( +- function isActive(obj) { return obj.active} ) +- value: active.length > 0 ? active.length : "" +- } +- subpage: Component { PageNotifications {} } +- } + +- MbSubMenu { +- description: qsTr("Settings") +- subpage: Component { PageSettings {} } +- } ++ VisualItemModel { //////// use VisualItemModel below for v2.93 and earlier ++ MbSubMenu { ++ id: menuNotifications ++ description: qsTr("Notifications") ++ item: VBusItem { ++ property variant active: NotificationCenter.notifications.filter( ++ function isActive(obj) { return obj.active} ) ++ value: active.length > 0 ? active.length : "" ++ } ++ subpage: Component { PageNotifications {} } ++ show: !settingsAtTop ++ } + +- MbOK { +- description: qsTr("Remove disconnected devices") +- value: qsTr("Press to remove") +- show: deviceList.disconnectedDevices != 0 +- editable: true ++ MbSubMenu { ++ description: qsTr("Settings") ++ subpage: Component { PageSettings {} } ++ show: !settingsAtTop ++ } + +- function clicked() { +- listview.decrementCurrentIndex() +- deviceList.removeDisconnected() +- } +- } +- } +- } ++ MbOK { ++ description: qsTr("Remove disconnected devices") ++ value: qsTr("Press to remove") ++ show: !settingsAtTop && deviceList.disconnectedDevices != 0 ++ editable: true + ++ function clicked() { ++ listview.decrementCurrentIndex() ++ deviceList.removeDisconnected() ++ } ++ } ++ } ++ } ++ + Component { + id: vebusPage + PageVebus {} diff --git a/FileSets/PatchSource/PageMain.qml-v3.22 b/FileSets/PatchSource/PageMain.qml-v3.22 index 9156b68c..454c2498 100644 --- a/FileSets/PatchSource/PageMain.qml-v3.22 +++ b/FileSets/PatchSource/PageMain.qml-v3.22 @@ -14,7 +14,7 @@ MbPage { model: VisualModels { //////// GuiMods put Settings, Notifications, Remove disconnected... at top of list - VisibleItemModel { + VisibleItemModel { //////// use VisualItemModel below for v2.93 and earlier MbSubMenu { description: qsTr("Settings") subpage: Component { PageSettings {} } @@ -68,7 +68,7 @@ MbPage { subpage: model.page } } - VisibleItemModel { + VisibleItemModel { //////// use VisualItemModel below for v2.93 and earlier MbSubMenu { id: menuNotifications description: qsTr("Notifications") diff --git a/FileSets/PatchSource/PageMain.qml-v3.22.patch b/FileSets/PatchSource/PageMain.qml-v3.22.patch index 182cce70..cbdceadf 100644 --- a/FileSets/PatchSource/PageMain.qml-v3.22.patch +++ b/FileSets/PatchSource/PageMain.qml-v3.22.patch @@ -1,5 +1,5 @@ --- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/PageMain.qml-v3.22.orig 2024-07-08 09:45:00 -+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/PageMain.qml-v3.22 2024-01-24 10:19:41 ++++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/PageMain.qml-v3.22 2024-07-09 09:53:20 @@ -1,11 +1,52 @@ +//////// GuiMods modified order to put Settings, then Notifications at top of list + @@ -17,7 +17,7 @@ + model: VisualModels { +//////// GuiMods put Settings, Notifications, Remove disconnected... at top of list -+ VisibleItemModel { ++ VisibleItemModel { //////// use VisualItemModel below for v2.93 and earlier + MbSubMenu { + description: qsTr("Settings") + subpage: Component { PageSettings {} } @@ -53,6 +53,15 @@ VisualDataModel { model: VeSortFilterProxyModel { model: DeviceList { +@@ -27,7 +68,7 @@ + subpage: model.page + } + } +- VisibleItemModel { ++ VisibleItemModel { //////// use VisualItemModel below for v2.93 and earlier + MbSubMenu { + id: menuNotifications + description: qsTr("Notifications") @@ -37,17 +78,22 @@ value: active.length > 0 ? active.length : "" } diff --git a/FileSets/PatchSource/PageMain.qml-v3.40~13 b/FileSets/PatchSource/PageMain.qml-v3.40~13 index 31ec72ff..34850138 100644 --- a/FileSets/PatchSource/PageMain.qml-v3.40~13 +++ b/FileSets/PatchSource/PageMain.qml-v3.40~13 @@ -14,7 +14,7 @@ MbPage { model: VisualModels { //////// GuiMods put Settings, Notifications, Remove disconnected... at top of list - VisibleItemModel { + VisibleItemModel { //////// use VisualItemModel below for v2.93 and earlier MbSubMenu { description: qsTr("Settings") subpage: Component { PageSettings {} } @@ -64,7 +64,7 @@ MbPage { subpage: model.page } } - VisibleItemModel { + VisibleItemModel { //////// use VisualItemModel below for v2.93 and earlier MbSubMenu { id: menuNotifications description: qsTr("Notifications") diff --git a/FileSets/PatchSource/PageMain.qml-v3.40~13.patch b/FileSets/PatchSource/PageMain.qml-v3.40~13.patch index 9026a911..f9d33465 100644 --- a/FileSets/PatchSource/PageMain.qml-v3.40~13.patch +++ b/FileSets/PatchSource/PageMain.qml-v3.40~13.patch @@ -1,5 +1,5 @@ --- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/PageMain.qml-v3.40~13.orig 2024-07-08 09:45:00 -+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/PageMain.qml-v3.40~13 2024-05-14 07:00:12 ++++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/PageMain.qml-v3.40~13 2024-07-09 09:53:47 @@ -1,11 +1,48 @@ +//////// GuiMods modified order to put Settings, then Notifications at top of list + @@ -17,7 +17,7 @@ + model: VisualModels { +//////// GuiMods put Settings, Notifications, Remove disconnected... at top of list -+ VisibleItemModel { ++ VisibleItemModel { //////// use VisualItemModel below for v2.93 and earlier + MbSubMenu { + description: qsTr("Settings") + subpage: Component { PageSettings {} } @@ -49,7 +49,14 @@ VisualDataModel { model: VeSortFilterProxyModel { model: DeviceList { -@@ -33,17 +70,22 @@ +@@ -27,23 +64,28 @@ + subpage: model.page + } + } +- VisibleItemModel { ++ VisibleItemModel { //////// use VisualItemModel below for v2.93 and earlier + MbSubMenu { + id: menuNotifications description: qsTr("Notifications") item: VBusItem { value: menuNotifications.subpage.summary } subpage: PageNotifications { } diff --git a/FileSets/PatchSource/PageMain.qml-v3.40~35 b/FileSets/PatchSource/PageMain.qml-v3.40~35 index 5cb741a8..9600c264 100644 --- a/FileSets/PatchSource/PageMain.qml-v3.40~35 +++ b/FileSets/PatchSource/PageMain.qml-v3.40~35 @@ -14,7 +14,7 @@ MbPage { model: VisualModels { //////// GuiMods put Settings, Notifications, Remove disconnected... at top of list - VisibleItemModel { + VisibleItemModel { //////// use VisualItemModel below for v2.93 and earlier MbSubMenu { description: qsTr("Settings") subpage: Component { PageSettings {} } @@ -64,7 +64,7 @@ MbPage { subpage: model.page } } - VisibleItemModel { + VisibleItemModel { //////// use VisualItemModel below for v2.93 and earlier MbSubMenu { id: menuNotifications description: qsTr("Notifications") diff --git a/FileSets/PatchSource/PageMain.qml-v3.40~35.patch b/FileSets/PatchSource/PageMain.qml-v3.40~35.patch index ed9fc280..d5c785ca 100644 --- a/FileSets/PatchSource/PageMain.qml-v3.40~35.patch +++ b/FileSets/PatchSource/PageMain.qml-v3.40~35.patch @@ -1,5 +1,5 @@ --- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/PageMain.qml-v3.40~35.orig 2024-07-08 09:45:00 -+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/PageMain.qml-v3.40~35 2024-05-17 07:21:07 ++++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/PageMain.qml-v3.40~35 2024-07-09 09:55:28 @@ -1,11 +1,48 @@ +//////// GuiMods modified order to put Settings, then Notifications at top of list + @@ -17,7 +17,7 @@ + model: VisualModels { +//////// GuiMods put Settings, Notifications, Remove disconnected... at top of list -+ VisibleItemModel { ++ VisibleItemModel { //////// use VisualItemModel below for v2.93 and earlier + MbSubMenu { + description: qsTr("Settings") + subpage: Component { PageSettings {} } @@ -49,7 +49,14 @@ VisualDataModel { model: VeSortFilterProxyModel { model: DeviceList { -@@ -33,17 +70,22 @@ +@@ -27,23 +64,28 @@ + subpage: model.page + } + } +- VisibleItemModel { ++ VisibleItemModel { //////// use VisualItemModel below for v2.93 and earlier + MbSubMenu { + id: menuNotifications description: qsTr("Notifications") item: VBusItem { value: menuNotifications.subpage.summary } subpage: PageNotifications { } diff --git a/changes b/changes index a6974e98..7bb0e235 100644 --- a/changes +++ b/changes @@ -1,3 +1,6 @@ +v10.54: + fixed: white screen with firmware prior to v3.0 + v10.53: add support for v3.40~36 switched several files to patched to minimize changes as firmware versions are released diff --git a/version b/version index 874ddc53..8cc1317a 100644 --- a/version +++ b/version @@ -1 +1 @@ -v10.53 +v10.54