Skip to content

Commit

Permalink
QtQuick version for GUIv1 changed
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-manuel committed Jan 31, 2025
1 parent 866daa0 commit ed9d520
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@
* Removed: The setting `SOC_RESET_TIME` was removed in the `config.default.ini` by @mr-manuel


## v1.6.20250123

### What's Changed

* Changed: GUIv1 updated QtQuick from 1.1 to 2 with Venus OS v3.60~20. Make sure to update to this driver version before you update Venus OS to v3.60~20 or later by @mr-manuel


## v1.5.20241215

### What's Changed
Expand Down
18 changes: 18 additions & 0 deletions dbus-serialbattery/custom-gui-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,24 @@ if [ -d "$pathGuiV1" ]; then
versionStringToNumber $(head -n 1 /opt/victronenergy/version)
((venusVersionNumber = $versionNumber))

# QtQick version 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="$pathGuiV1/qml"

if (( $venusVersionNumber < $versionNumber )); then
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"
fileList+=" $qmlDir/PageBatterySettings.qml"
fileList+=" $qmlDir/PageLynxIonIo.qml"
for file in $fileList ; do
sed -i -e 's/QtQuick 2/QtQuick 1.1/' "$file"
done
fi

# Some class names changed with this Venus OS version
versionStringToNumber "v3.00~14"

Expand Down
2 changes: 1 addition & 1 deletion dbus-serialbattery/qml/gui-v1/PageBattery.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import QtQuick 1.1
import QtQuick 2
import com.victron.velib 1.0

MbPage {
Expand Down
2 changes: 1 addition & 1 deletion dbus-serialbattery/qml/gui-v1/PageBatteryCellVoltages.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import QtQuick 1.1
import QtQuick 2
import com.victron.velib 1.0

MbPage {
Expand Down
2 changes: 1 addition & 1 deletion dbus-serialbattery/qml/gui-v1/PageBatteryParameters.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import QtQuick 1.1
import QtQuick 2
import com.victron.velib 1.0

MbPage {
Expand Down
4 changes: 2 additions & 2 deletions dbus-serialbattery/qml/gui-v1/PageBatterySettings.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import QtQuick 1.1
import QtQuick 2
import com.victron.velib 1.0
import "utils.js" as Utils

Expand Down Expand Up @@ -57,7 +57,7 @@ MbPage {
show: valid
}


MbSpinBox {
description: "Reset SoC to"
item.bind: Utils.path(bindPrefix, "/Settings/ResetSoc")
Expand Down
2 changes: 1 addition & 1 deletion dbus-serialbattery/qml/gui-v1/PageLynxIonIo.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import QtQuick 1.1
import QtQuick 2
import "utils.js" as Utils

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


# CONSTANTS
DRIVER_VERSION: str = "2.0.20250120dev"
DRIVER_VERSION: str = "2.0.20250131dev"
"""
current version of the driver
"""
Expand Down

0 comments on commit ed9d520

Please sign in to comment.