From 853dfbcb8731c5e717c569e576fbe42673317011 Mon Sep 17 00:00:00 2001 From: kwindrem <58538395+kwindrem@users.noreply.github.com> Date: Thu, 30 Sep 2021 23:43:31 -0700 Subject: [PATCH] removed shutdown kludge The previous version implemented a shutdown mechanism that employed a "relay" output looped back to a "digital input". This version removes this functionality. ShutdownMonitor provides the same clean shutdown functionality without looping back pins on the PI's GPIO header. --- .DS_Store | Bin 10244 -> 10244 bytes FileSets/.DS_Store | Bin 8196 -> 6148 bytes FileSets/fileList | 1 - FileSets/gpio_list | 8 -- FileSets/v2.40/PageSettingsGeneral.qml | 135 ------------------ FileSets/v2.40/PageSettingsGeneral.qml.orig | 109 --------------- FileSets/v2.60/.DS_Store | Bin 6148 -> 0 bytes FileSets/v2.60/PageSettingsGeneral.qml | 143 -------------------- FileSets/v2.60/PageSettingsGeneral.qml.orig | 117 ---------------- FileSets/v2.71/.DS_Store | Bin 6148 -> 0 bytes FileSets/v2.71/PageSettingsGeneral.qml | 143 -------------------- FileSets/v2.71/PageSettingsGeneral.qml.orig | 117 ---------------- ReadMe | 4 - service/.DS_Store | Bin 6148 -> 0 bytes service/log/run | 3 - service/run | 4 - setup | 31 +---- timeStamp | 2 +- version | 2 +- 19 files changed, 3 insertions(+), 816 deletions(-) delete mode 100644 FileSets/v2.40/PageSettingsGeneral.qml delete mode 100644 FileSets/v2.40/PageSettingsGeneral.qml.orig delete mode 100644 FileSets/v2.60/.DS_Store delete mode 100644 FileSets/v2.60/PageSettingsGeneral.qml delete mode 100644 FileSets/v2.60/PageSettingsGeneral.qml.orig delete mode 100644 FileSets/v2.71/.DS_Store delete mode 100644 FileSets/v2.71/PageSettingsGeneral.qml delete mode 100644 FileSets/v2.71/PageSettingsGeneral.qml.orig delete mode 100644 service/.DS_Store delete mode 100755 service/log/run delete mode 100755 service/run diff --git a/.DS_Store b/.DS_Store index 296730cbe0174d574cbfefe63848f4305edb221b..d9193cc3450334baa267475c7bba123505dade51 100644 GIT binary patch literal 10244 zcmeHM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BSovXh!{Ck{6|V(lhE&zi{vvT^tVXpKcNgnsDdyohUL%z8(|YtxEVIXJ0t5mC0t5mC z0tBuHfii9!X7~S_um1o4^$Z!<1_%TQ{KpW0@@OpDgo`empvSMD-L;1?@5js%vm4>k zbHRd{uzv449vkeA(7R&5KL2vT(?@)}5iUJ<^z+|IYx&49@@lwODZe|6iW} F{|3cZ5{v)< diff --git a/FileSets/.DS_Store b/FileSets/.DS_Store index ed58f526908d28524f19537f35f42042c4872ad2..761f2501505dd5f78c5d43f3549e72572d2624b6 100644 GIT binary patch delta 205 zcmZp1XfcprU|?W$DortDU=RQ@Ie-{Mvv5r;6q~50$SAlmU^g?P;A9?w-;4~CIRs^t z42psBtPEugMhtokCJY9-`7SO=Ir&LY-G2?6C%XyCu`qxb8G>??&k6BPo-8QCWtvi) zoRgHFpTjUYK&W}Lya*qUA%h`8@Pe?&f=1OfqWAmIvf(Z<5> Y%#-w0d&VJQvd(} delta 639 zcmZoMXmOBWU|?W$DortDU;r^WfEYvza8E20o2aMAD8DgaH}hr%jz7$c**Q2SHn1?t zPv&9y&B!>JgH=Y!PYtM+m7$Emh(V9Rgux&;-^C>_J#z3U}A!ovh9EFbQ)8L%0NzdY~|>gUz3y%Az`$AsWrWK>fM- z$PPwRA)?0sR04J}!oia**kplWAI3I&vJD$wy%D+_Kpp}{A|ygA7z`NdfKdaq2N5le z9^NZYLV^y9I)r=hse?HR6hmOJd9R2&^TY-oL1qYFf*VM?f|Ai@L5}atlletFC;Rho PZ~!A5tY>pP&m3j|#= User.AccessInstaller && ++repeatCount > 60) { - if (accessLevelSelect.value !== User.AccessSuperUser) - accessLevelSelect.item.setValue(User.AccessSuperUser) - repeatCount = 0 - } - } - } - - MbEditBox { - show: user.accessLevel >= User.AccessSuperUser - description: "Set root password" - onEditDone: { - if (newValue.length < 6) { - toast.createToast("Please enter at least 6 characters") - } else { - toast.createToast(vePlatform.setRootPassword(newValue)) - item.value = "" - } - } - } - - MbSwitch { - name: qsTr("SSH on LAN") - show: user.accessLevel >= User.AccessSuperUser - bind: "com.victronenergy.settings/Settings/System/SSHLocal" - } - - MbSwitch { - id: remoteSupportOnOff - name: qsTr("Remote support") - bind: "com.victronenergy.settings/Settings/System/RemoteSupport" - } - - MbItemValue { - description: qsTr("Remote support tunnel") - item.value: remotePort.item.valid && remotePort.item.value !== 0 ? qsTr("Online") : qsTr("Offline") - show: remoteSupportOnOff.item.value - } - - MbItemValue { - id: remotePort - description: qsTr("Remote support port") - item.bind: "com.victronenergy.settings/Settings/System/RemoteSupportPort" - show: remoteSupportOnOff.item.value - } - - MbOK { - id: reboot - description: qsTr("Reboot?") - writeAccessLevel: User.AccessUser - onClicked: { - toast.createToast(qsTr("Rebooting..."), 10000, "icon-restart-active") - vePlatform.reboot() - } - } -//////// add for Shutdown command - // shutdown uses a psudo relay output connected to a psudo digital input - // shutdownItem is the relay state in system - // shutdownItem2 is the relay innitial state in settings - // the latter must not remain set through the shutdown or the system - // will shutdown immediately on startup!!! - MbOK { - id: shutdown - description: qsTr("Shutdown?") - writeAccessLevel: User.AccessUser - onClicked: - { - toast.createToast(qsTr("Shutting down..."), 10000, "icon-restart-active") - if (shutdownItem.valid) - shutdownItem.setValue (1) - if (shutdownItem2.valid) - shutdownItem2.setValue (0) - } - } - - MbSwitch { - property VBusItem hasBuzzer: VBusItem {bind: "com.victronenergy.system/Buzzer/State"} - name: qsTr("Audible alarm") - bind: Utils.path(bindPrefix, "/Settings/Alarm/Audible") - show: hasBuzzer.valid - } - - MbItemOptions { - id: demoOnOff - description: qsTr("Demo mode") - bind: Utils.path(bindPrefix, "/Settings/Gui/DemoMode") - possibleValues: [ - MbOption { description: qsTr("Disabled"); value: 0 }, - MbOption { description: qsTr("ESS demo"); value: 1 }, - MbOption { description: qsTr("Boat/Motorhome demo 1"); value: 2 }, - MbOption { description: qsTr("Boat/Motorhome demo 2"); value: 3 } - ] - } - - MbItemText { - text: qsTr("Starting demo mode will change some settings and the user interface will be unresponsive for a moment.") - wrapMode: Text.WordWrap - } - } -} diff --git a/FileSets/v2.40/PageSettingsGeneral.qml.orig b/FileSets/v2.40/PageSettingsGeneral.qml.orig deleted file mode 100644 index 7f692e1..0000000 --- a/FileSets/v2.40/PageSettingsGeneral.qml.orig +++ /dev/null @@ -1,109 +0,0 @@ -import QtQuick 1.1 -import com.victron.velib 1.0 -import "utils.js" as Utils - -MbPage -{ - id: root - property string bindPrefix: "com.victronenergy.settings" - - model: VisualItemModel { - MbItemOptions { - id: accessLevelSelect - description: qsTr("Access level") - bind: Utils.path(bindPrefix, "/Settings/System/AccessLevel") - magicKeys: true - writeAccessLevel: User.AccessUser - possibleValues: [ - MbOption { description: qsTr("User"); value: User.AccessUser; password: "ZZZ" }, - MbOption { description: qsTr("User & Installer"); value: User.AccessInstaller; password: "ZZZ" }, - MbOption { description: qsTr("Superuser"); value: User.AccessSuperUser; readonly: true }, - MbOption { description: qsTr("Service"); value: User.AccessService; readonly: true } - ] - - // change to super user mode if the right button is pressed for a while - property int repeatCount - onFocusChanged: repeatCount = 0 - - function open() { - if (user.accessLevel >= User.AccessInstaller && ++repeatCount > 60) { - if (accessLevelSelect.value !== User.AccessSuperUser) - accessLevelSelect.item.setValue(User.AccessSuperUser) - repeatCount = 0 - } - } - } - - MbEditBox { - show: user.accessLevel >= User.AccessSuperUser - description: "Set root password" - onEditDone: { - if (newValue.length < 6) { - toast.createToast("Please enter at least 6 characters") - } else { - toast.createToast(vePlatform.setRootPassword(newValue)) - item.value = "" - } - } - } - - MbSwitch { - name: qsTr("SSH on LAN") - show: user.accessLevel >= User.AccessSuperUser - bind: "com.victronenergy.settings/Settings/System/SSHLocal" - } - - MbSwitch { - id: remoteSupportOnOff - name: qsTr("Remote support") - bind: "com.victronenergy.settings/Settings/System/RemoteSupport" - } - - MbItemValue { - description: qsTr("Remote support tunnel") - item.value: remotePort.item.valid && remotePort.item.value !== 0 ? qsTr("Online") : qsTr("Offline") - show: remoteSupportOnOff.item.value - } - - MbItemValue { - id: remotePort - description: qsTr("Remote support port") - item.bind: "com.victronenergy.settings/Settings/System/RemoteSupportPort" - show: remoteSupportOnOff.item.value - } - - MbOK { - id: reboot - description: qsTr("Reboot?") - writeAccessLevel: User.AccessUser - onClicked: { - toast.createToast(qsTr("Rebooting..."), 10000, "icon-restart-active") - vePlatform.reboot() - } - } - - MbSwitch { - property VBusItem hasBuzzer: VBusItem {bind: "com.victronenergy.system/Buzzer/State"} - name: qsTr("Audible alarm") - bind: Utils.path(bindPrefix, "/Settings/Alarm/Audible") - show: hasBuzzer.valid - } - - MbItemOptions { - id: demoOnOff - description: qsTr("Demo mode") - bind: Utils.path(bindPrefix, "/Settings/Gui/DemoMode") - possibleValues: [ - MbOption { description: qsTr("Disabled"); value: 0 }, - MbOption { description: qsTr("ESS demo"); value: 1 }, - MbOption { description: qsTr("Boat/Motorhome demo 1"); value: 2 }, - MbOption { description: qsTr("Boat/Motorhome demo 2"); value: 3 } - ] - } - - MbItemText { - text: qsTr("Starting demo mode will change some settings and the user interface will be unresponsive for a moment.") - wrapMode: Text.WordWrap - } - } -} diff --git a/FileSets/v2.60/.DS_Store b/FileSets/v2.60/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0= User.AccessInstaller) accessLevelSelect.item.setValue(User.AccessSuperUser) - } - - // change to super user mode if the right button is pressed for a while - property int repeatCount - onFocusChanged: repeatCount = 0 - - function open() { - if (user.accessLevel >= User.AccessInstaller && ++repeatCount > 60) { - if (accessLevelSelect.value !== User.AccessSuperUser) - accessLevelSelect.item.setValue(User.AccessSuperUser) - repeatCount = 0 - } - } - } - - MbEditBox { - show: user.accessLevel >= User.AccessSuperUser - description: "Set root password" - onEditDone: { - if (newValue.length < 6) { - toast.createToast("Please enter at least 6 characters") - } else { - toast.createToast(vePlatform.setRootPassword(newValue)) - item.value = "" - } - } - } - - MbSwitch { - name: qsTr("SSH on LAN") - show: user.accessLevel >= User.AccessSuperUser - bind: "com.victronenergy.settings/Settings/System/SSHLocal" - } - - MbSwitch { - id: remoteSupportOnOff - name: qsTr("Remote support") - bind: "com.victronenergy.settings/Settings/System/RemoteSupport" - } - - MbItemValue { - description: qsTr("Remote support tunnel") - item.value: remotePort.item.valid && remotePort.item.value !== 0 ? qsTr("Online") : qsTr("Offline") - show: remoteSupportOnOff.item.value - } - - MbItemValue { - id: remotePort - description: qsTr("Remote support IP and port") - item.bind: "com.victronenergy.settings/Settings/System/RemoteSupportIpAndPort" - show: remoteSupportOnOff.item.value - } - - MbOK { - id: reboot - description: qsTr("Reboot?") - writeAccessLevel: User.AccessUser - onClicked: { - toast.createToast(qsTr("Rebooting..."), 10000, "icon-restart-active") - vePlatform.reboot() - } - } -//////// add for Shutdown command - // shutdown uses a psudo relay output connected to a psudo digital input - // shutdownItem is the relay state in system - // shutdownItem2 is the relay innitial state in settings - // the latter must not remain set through the shutdown or the system - // will shutdown immediately on startup!!! - MbOK { - id: shutdown - description: qsTr("Shutdown?") - writeAccessLevel: User.AccessUser - onClicked: - { - toast.createToast(qsTr("Shutting down..."), 10000, "icon-restart-active") - if (shutdownItem.valid) - shutdownItem.setValue (1) - if (shutdownItem2.valid) - shutdownItem2.setValue (0) - } - } - - MbSwitch { - property VBusItem hasBuzzer: VBusItem {bind: "com.victronenergy.system/Buzzer/State"} - name: qsTr("Audible alarm") - bind: Utils.path(bindPrefix, "/Settings/Alarm/Audible") - show: hasBuzzer.valid - } - - MbItemOptions { - id: demoOnOff - description: qsTr("Demo mode") - bind: Utils.path(bindPrefix, "/Settings/Gui/DemoMode") - possibleValues: [ - MbOption { description: qsTr("Disabled"); value: 0 }, - MbOption { description: qsTr("ESS demo"); value: 1 }, - MbOption { description: qsTr("Boat/Motorhome demo 1"); value: 2 }, - MbOption { description: qsTr("Boat/Motorhome demo 2"); value: 3 } - ] - } - - MbItemText { - text: qsTr("Starting demo mode will change some settings and the user interface will be unresponsive for a moment.") - wrapMode: Text.WordWrap - } - } -} diff --git a/FileSets/v2.60/PageSettingsGeneral.qml.orig b/FileSets/v2.60/PageSettingsGeneral.qml.orig deleted file mode 100644 index 21a9c82..0000000 --- a/FileSets/v2.60/PageSettingsGeneral.qml.orig +++ /dev/null @@ -1,117 +0,0 @@ -import QtQuick 1.1 -import com.victron.velib 1.0 -import "utils.js" as Utils - -MbPage -{ - id: root - property string bindPrefix: "com.victronenergy.settings" - - model: VisualItemModel { - MbItemOptions { - id: accessLevelSelect - description: qsTr("Access level") - bind: Utils.path(bindPrefix, "/Settings/System/AccessLevel") - magicKeys: true - writeAccessLevel: User.AccessUser - possibleValues: [ - MbOption { description: qsTr("User"); value: User.AccessUser; password: "ZZZ" }, - MbOption { description: qsTr("User & Installer"); value: User.AccessInstaller; password: "ZZZ" }, - MbOption { description: qsTr("Superuser"); value: User.AccessSuperUser; readonly: true }, - MbOption { description: qsTr("Service"); value: User.AccessService; readonly: true } - ] - - // touch version to get super user - property bool pulledDown: listview.contentY < -60 - Timer { - running: accessLevelSelect.pulledDown - interval: 5000 - onTriggered: if (user.accessLevel >= User.AccessInstaller) accessLevelSelect.item.setValue(User.AccessSuperUser) - } - - // change to super user mode if the right button is pressed for a while - property int repeatCount - onFocusChanged: repeatCount = 0 - - function open() { - if (user.accessLevel >= User.AccessInstaller && ++repeatCount > 60) { - if (accessLevelSelect.value !== User.AccessSuperUser) - accessLevelSelect.item.setValue(User.AccessSuperUser) - repeatCount = 0 - } - } - } - - MbEditBox { - show: user.accessLevel >= User.AccessSuperUser - description: "Set root password" - onEditDone: { - if (newValue.length < 6) { - toast.createToast("Please enter at least 6 characters") - } else { - toast.createToast(vePlatform.setRootPassword(newValue)) - item.value = "" - } - } - } - - MbSwitch { - name: qsTr("SSH on LAN") - show: user.accessLevel >= User.AccessSuperUser - bind: "com.victronenergy.settings/Settings/System/SSHLocal" - } - - MbSwitch { - id: remoteSupportOnOff - name: qsTr("Remote support") - bind: "com.victronenergy.settings/Settings/System/RemoteSupport" - } - - MbItemValue { - description: qsTr("Remote support tunnel") - item.value: remotePort.item.valid && remotePort.item.value !== 0 ? qsTr("Online") : qsTr("Offline") - show: remoteSupportOnOff.item.value - } - - MbItemValue { - id: remotePort - description: qsTr("Remote support IP and port") - item.bind: "com.victronenergy.settings/Settings/System/RemoteSupportIpAndPort" - show: remoteSupportOnOff.item.value - } - - MbOK { - id: reboot - description: qsTr("Reboot?") - writeAccessLevel: User.AccessUser - onClicked: { - toast.createToast(qsTr("Rebooting..."), 10000, "icon-restart-active") - vePlatform.reboot() - } - } - - MbSwitch { - property VBusItem hasBuzzer: VBusItem {bind: "com.victronenergy.system/Buzzer/State"} - name: qsTr("Audible alarm") - bind: Utils.path(bindPrefix, "/Settings/Alarm/Audible") - show: hasBuzzer.valid - } - - MbItemOptions { - id: demoOnOff - description: qsTr("Demo mode") - bind: Utils.path(bindPrefix, "/Settings/Gui/DemoMode") - possibleValues: [ - MbOption { description: qsTr("Disabled"); value: 0 }, - MbOption { description: qsTr("ESS demo"); value: 1 }, - MbOption { description: qsTr("Boat/Motorhome demo 1"); value: 2 }, - MbOption { description: qsTr("Boat/Motorhome demo 2"); value: 3 } - ] - } - - MbItemText { - text: qsTr("Starting demo mode will change some settings and the user interface will be unresponsive for a moment.") - wrapMode: Text.WordWrap - } - } -} diff --git a/FileSets/v2.71/.DS_Store b/FileSets/v2.71/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0= User.AccessInstaller) accessLevelSelect.item.setValue(User.AccessSuperUser) - } - - // change to super user mode if the right button is pressed for a while - property int repeatCount - onFocusChanged: repeatCount = 0 - - function open() { - if (user.accessLevel >= User.AccessInstaller && ++repeatCount > 60) { - if (accessLevelSelect.value !== User.AccessSuperUser) - accessLevelSelect.item.setValue(User.AccessSuperUser) - repeatCount = 0 - } - } - } - - MbEditBox { - description: "Set root password" - showAccessLevel: User.AccessSuperUser - onEditDone: { - if (newValue.length < 6) { - toast.createToast("Please enter at least 6 characters") - } else { - toast.createToast(vePlatform.setRootPassword(newValue)) - item.value = "" - } - } - } - - MbSwitch { - name: qsTr("SSH on LAN") - showAccessLevel: User.AccessSuperUser - bind: "com.victronenergy.settings/Settings/System/SSHLocal" - } - - MbSwitch { - id: remoteSupportOnOff - name: qsTr("Remote support") - bind: "com.victronenergy.settings/Settings/System/RemoteSupport" - } - - MbItemValue { - description: qsTr("Remote support tunnel") - item.value: remotePort.item.valid && remotePort.item.value !== 0 ? qsTr("Online") : qsTr("Offline") - show: remoteSupportOnOff.item.value - } - - MbItemValue { - id: remotePort - description: qsTr("Remote support IP and port") - item.bind: "com.victronenergy.settings/Settings/System/RemoteSupportIpAndPort" - show: remoteSupportOnOff.item.value - } - - MbOK { - id: reboot - description: qsTr("Reboot?") - writeAccessLevel: User.AccessUser - onClicked: { - toast.createToast(qsTr("Rebooting..."), 10000, "icon-restart-active") - vePlatform.reboot() - } - } -//////// add for Shutdown command - // shutdown uses a psudo relay output connected to a psudo digital input - // shutdownItem is the relay state in system - // shutdownItem2 is the relay innitial state in settings - // the latter must not remain set through the shutdown or the system - // will shutdown immediately on startup!!! - MbOK { - id: shutdown - description: qsTr("Shutdown?") - writeAccessLevel: User.AccessUser - onClicked: - { - toast.createToast(qsTr("Shutting down..."), 10000, "icon-restart-active") - if (shutdownItem.valid) - shutdownItem.setValue (1) - if (shutdownItem2.valid) - shutdownItem2.setValue (0) - } - } - - MbSwitch { - property VBusItem hasBuzzer: VBusItem {bind: "com.victronenergy.system/Buzzer/State"} - name: qsTr("Audible alarm") - bind: Utils.path(bindPrefix, "/Settings/Alarm/Audible") - show: hasBuzzer.valid - } - - MbItemOptions { - id: demoOnOff - description: qsTr("Demo mode") - bind: Utils.path(bindPrefix, "/Settings/Gui/DemoMode") - possibleValues: [ - MbOption { description: qsTr("Disabled"); value: 0 }, - MbOption { description: qsTr("ESS demo"); value: 1 }, - MbOption { description: qsTr("Boat/Motorhome demo 1"); value: 2 }, - MbOption { description: qsTr("Boat/Motorhome demo 2"); value: 3 } - ] - } - - MbItemText { - text: qsTr("Starting demo mode will change some settings and the user interface will be unresponsive for a moment.") - wrapMode: Text.WordWrap - } - } -} diff --git a/FileSets/v2.71/PageSettingsGeneral.qml.orig b/FileSets/v2.71/PageSettingsGeneral.qml.orig deleted file mode 100644 index 4aa39ec..0000000 --- a/FileSets/v2.71/PageSettingsGeneral.qml.orig +++ /dev/null @@ -1,117 +0,0 @@ -import QtQuick 1.1 -import com.victron.velib 1.0 -import "utils.js" as Utils - -MbPage -{ - id: root - property string bindPrefix: "com.victronenergy.settings" - - model: VisualItemModel { - MbItemOptions { - id: accessLevelSelect - description: qsTr("Access level") - bind: Utils.path(bindPrefix, "/Settings/System/AccessLevel") - magicKeys: true - writeAccessLevel: User.AccessUser - possibleValues: [ - MbOption { description: qsTr("User"); value: User.AccessUser; password: "ZZZ" }, - MbOption { description: qsTr("User & Installer"); value: User.AccessInstaller; password: "ZZZ" }, - MbOption { description: qsTr("Superuser"); value: User.AccessSuperUser; readonly: true }, - MbOption { description: qsTr("Service"); value: User.AccessService; readonly: true } - ] - - // touch version to get super user - property bool pulledDown: listview.contentY < -60 - Timer { - running: accessLevelSelect.pulledDown - interval: 5000 - onTriggered: if (user.accessLevel >= User.AccessInstaller) accessLevelSelect.item.setValue(User.AccessSuperUser) - } - - // change to super user mode if the right button is pressed for a while - property int repeatCount - onFocusChanged: repeatCount = 0 - - function open() { - if (user.accessLevel >= User.AccessInstaller && ++repeatCount > 60) { - if (accessLevelSelect.value !== User.AccessSuperUser) - accessLevelSelect.item.setValue(User.AccessSuperUser) - repeatCount = 0 - } - } - } - - MbEditBox { - description: "Set root password" - showAccessLevel: User.AccessSuperUser - onEditDone: { - if (newValue.length < 6) { - toast.createToast("Please enter at least 6 characters") - } else { - toast.createToast(vePlatform.setRootPassword(newValue)) - item.value = "" - } - } - } - - MbSwitch { - name: qsTr("SSH on LAN") - showAccessLevel: User.AccessSuperUser - bind: "com.victronenergy.settings/Settings/System/SSHLocal" - } - - MbSwitch { - id: remoteSupportOnOff - name: qsTr("Remote support") - bind: "com.victronenergy.settings/Settings/System/RemoteSupport" - } - - MbItemValue { - description: qsTr("Remote support tunnel") - item.value: remotePort.item.valid && remotePort.item.value !== 0 ? qsTr("Online") : qsTr("Offline") - show: remoteSupportOnOff.item.value - } - - MbItemValue { - id: remotePort - description: qsTr("Remote support IP and port") - item.bind: "com.victronenergy.settings/Settings/System/RemoteSupportIpAndPort" - show: remoteSupportOnOff.item.value - } - - MbOK { - id: reboot - description: qsTr("Reboot?") - writeAccessLevel: User.AccessUser - onClicked: { - toast.createToast(qsTr("Rebooting..."), 10000, "icon-restart-active") - vePlatform.reboot() - } - } - - MbSwitch { - property VBusItem hasBuzzer: VBusItem {bind: "com.victronenergy.system/Buzzer/State"} - name: qsTr("Audible alarm") - bind: Utils.path(bindPrefix, "/Settings/Alarm/Audible") - show: hasBuzzer.valid - } - - MbItemOptions { - id: demoOnOff - description: qsTr("Demo mode") - bind: Utils.path(bindPrefix, "/Settings/Gui/DemoMode") - possibleValues: [ - MbOption { description: qsTr("Disabled"); value: 0 }, - MbOption { description: qsTr("ESS demo"); value: 1 }, - MbOption { description: qsTr("Boat/Motorhome demo 1"); value: 2 }, - MbOption { description: qsTr("Boat/Motorhome demo 2"); value: 3 } - ] - } - - MbItemText { - text: qsTr("Starting demo mode will change some settings and the user interface will be unresponsive for a moment.") - wrapMode: Text.WordWrap - } - } -} diff --git a/ReadMe b/ReadMe index 6fd0836..c49f211 100644 --- a/ReadMe +++ b/ReadMe @@ -6,10 +6,6 @@ This script adds: the additional GPIO pins (5 total) to /etc/venus/gpio_list makes additional digital inputs available makes all digital inputs behave the same: pull up so they are active low - shutdown command to Device List / Settings / General - -To use the shutdown command, pins 38 and 36 of the RPI's GPIO header must be connected - If you don't want the shutdown command to function, do not jumper these pins The Raspberry PI default is for the first 8 GPIO pins to have pull UPs and the remaining have pull DOWNs. This makes some digital input pins behave differently diff --git a/service/.DS_Store b/service/.DS_Store deleted file mode 100644 index e32a021ba61153863fc9b69c6cf787d078925f3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKOKQU~5S?jK2y~NWmbyYtP&K$G$OVdHNEZqUlQK{VC}jqu zH=d7dJ+MYYM7((&)+P-{j=qii@8Co2y1vvN7I4!(-cIiiWAE^b_xL$&7zhT=49NMAFa)z>Gt{F4lePfBIm{~1^+F3wVgP2xW(W&}Efr{~>@5ac zI_$~gvSTx}bYguo*6}xgH81SfX-*nWoDE|R27-Z02E0jMO8tMtuQb`@U#7%UFc1v< zGX{9xZMzLN<+b(4_N3M(j3*2ciEE-jplc}xYAMEpoFglBnm>sSe|Bt!vWnO>9T*n@ MB_yU`;0g?U0&UYOaR2}S diff --git a/service/log/run b/service/log/run deleted file mode 100755 index 2860bb2..0000000 --- a/service/log/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -exec multilog t s25000 n4 /var/log/gracefulShutdown - diff --git a/service/run b/service/run deleted file mode 100755 index 42b2d5b..0000000 --- a/service/run +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -exec 2>&1 -exec /data/RpiGpioSetup/GracefulShutdown.sh - diff --git a/setup b/setup index e8806af..db9514e 100755 --- a/setup +++ b/setup @@ -19,15 +19,12 @@ # run manually initally, then called from reinstallMods # to uninstall/deactivate, call this script with "uninstall" as first parameter -# a shutdown command is added to the Settings / General -# the shutdown uses a psudo-digital input jumpered to a psudo-relay output # Note, this script DOES require a system reboot. gpioListFile="/etc/venus/gpio_list" overlayFile="/u-boot/overlays/VenusGpioOverlay.dtb" relayStateFile="/opt/victronenergy/dbus-systemcalc-py/delegates/relaystate.py" configFile="/u-boot/config.txt" -pageGeneralFile="/opt/victronenergy/gui/qml/PageSettingsGeneral.qml" # no log file for this package packageLogFile="" @@ -69,22 +66,7 @@ if [ $scriptAction == 'NONE' ] ; then echo " Activates all 5 predefined digital inputs" echo " Changes all digital inputs to have pull-ups in stead of a mix of pull up/down" - standardActionPrompt 'MORE_PROMPTS' - - # installing (not reinstalling) - prompt for options - if [ $scriptAction == 'NONE' ]; then - echo - echo "An optional shutdown command is added to Settings / General:" - echo " to use this command, RPI GPIO pings 38 and 36 must be connected together" - echo - read -p "Do you wish to install ths shugdown command? (y/n)? " - if $yesResponse ; then - touch "$setupOptionsDir/shutdownCommand" - else - rm -f "$setupOptionsDir/shutdownCommand" - fi - scriptAction='INSTALL' - fi + standardActionPrompt fi #### installing @@ -105,15 +87,6 @@ if [ $scriptAction == 'INSTALL' ] ; then echo "#### end change all digital inputs to pull ups" >> "$configFile" filesUpdated=true fi - - - if [ -f $setupOptionsDir/shutdownCommand ]; then - updateActiveFile "$pageGeneralFile" - installService $packageName - else - restoreActiveFile "$pageGeneralFile" - removeService $packageName - fi fi # uninstalling - check scriptAction again @@ -122,8 +95,6 @@ if [ $scriptAction == 'UNINSTALL' ] ; then restoreActiveFile "$gpioListFile" restoreActiveFile "$overlayFile" restoreActiveFile "$relayStateFile" - restoreActiveFile "$pageGeneralFile" - removeService $packageName # remove mods from configFile - do not use restore in case other mods were made manually if [ -f "$configFile" ]; then diff --git a/timeStamp b/timeStamp index 5979dcc..a353ef4 100644 --- a/timeStamp +++ b/timeStamp @@ -1 +1 @@ -1632854043 +1633068625 diff --git a/version b/version index 8616689..4d5034c 100644 --- a/version +++ b/version @@ -1 +1 @@ -v3.1 +v3.2