Skip to content

Commit

Permalink
GUIv2 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-manuel committed Jan 31, 2025
1 parent ac13b2b commit 01c01b8
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
* 🚨 The Bluetooth connection is still not stable on some systems. If you want to have a stable connection use the serial connection.


## v1.6.20250131

### What's Changed

* Changed: GUIv2 changes by @mr-manuel


## v1.6.20250123

### What's Changed
Expand Down
26 changes: 24 additions & 2 deletions etc/dbus-serialbattery/install-qml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ if [ -d /opt/victronenergy/gui ]; then
((venusVersionNumber = $versionNumber))

# QtQick version changed with this Venus OS version
versionStringToNumber "v3.60~20"
versionStringToNumber "v3.60~18"

# change in Victron directory, else the files are "broken" if upgrading from v2 to v3
qmlDir="/opt/victronenergy/gui/qml"

if (( $venusVersionNumber < $versionNumber )); then
echo -n "Venus OS $(head -n 1 /opt/victronenergy/version) is older than v3.60~20. Fixing QtQuick version... "
echo -n "Venus OS $(head -n 1 /opt/victronenergy/version) is older than v3.60~18. Fixing QtQuick version... "
fileList="$qmlDir/PageBattery.qml"
fileList+=" $qmlDir/PageBatteryCellVoltages.qml"
fileList+=" $qmlDir/PageBatteryParameters.qml"
Expand Down Expand Up @@ -246,6 +246,28 @@ if [ -d /opt/victronenergy/gui-v2 ]; then
done
fi

# Some property names changed with this Venus OS version
versionStringToNumber "v3.60~18"

# change files in the destination folder, else the files are "broken" if upgrading to a the newer Venus OS version
qmlDir="/opt/victronenergy/gui-v2/Victron/VenusOS/pages/settings/devicelist/battery"

if (( $venusVersionNumber < $versionNumber )); then
echo "Venus OS $(head -n 1 /opt/victronenergy/version) is older than v3.60~18. Fixing property names... "
fileList="$qmlDir/PageBattery.qml"
fileList+=" $qmlDir/PageBatteryCellVoltages.qml"
fileList+=" $qmlDir/PageBatteryParameters.qml"
fileList+=" $qmlDir/PageBatterySettings.qml"
fileList+=" $qmlDir/PageLynxIonIo.qml"
for file in $fileList ; do
sed -i -e 's/preferredVisible:/allowed: defaultAllowed \&\&/' "$file"
done

echo "Venus OS $(head -n 1 /opt/victronenergy/version) is older than v3.60~18. Fixing battery object... "
sed -i -e 's/required property string bindPrefix/property string bindPrefix: battery.serviceUid/' "$qmlDir/PageBattery.qml"
sed -i -e '/Device {/{N;N;N;s/Device {\n\t\tid: battery\n\t\tserviceUid: root.bindPrefix\n\t}/property var battery/}' "$qmlDir/PageBattery.qml"
fi

echo "done."

fi
Expand Down
2 changes: 1 addition & 1 deletion etc/dbus-serialbattery/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


# CONSTANTS
DRIVER_VERSION: str = "1.6.20250123dev"
DRIVER_VERSION: str = "1.6.20250131dev"
"""
current version of the driver
"""
Expand Down

0 comments on commit 01c01b8

Please sign in to comment.