Skip to content

Commit

Permalink
Add dbus-serialbattery fields
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-manuel committed Dec 20, 2024
1 parent 8397825 commit b4bc8c2
Show file tree
Hide file tree
Showing 7 changed files with 1,025 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ jobs:
sed -i "s%^var \(createQtAppInstance\)%window.\1%" artifacts/wasm/venus-gui-v2.js
cp .github/patches/Makefile artifacts/wasm/
cp LICENSE.txt artifacts/wasm/
cd artifacts
cd artifacts/wasm
gzip -k venus-gui-v2.wasm
sha256sum venus-gui-v2.wasm > venus-gui-v2.wasm.sha256
rm venus-gui-v2.wasm
cd ..
zip -r ../venus-webassembly.zip wasm
- name: Upload wasm files
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ set (VENUS_QML_MODULE_SOURCES
pages/settings/devicelist/battery/Page48TlDiagnostics.qml
pages/settings/devicelist/battery/PageBattery.qml
pages/settings/devicelist/battery/PageBatteryAlarms.qml
pages/settings/devicelist/battery/PageBatteryCellVoltages.qml
pages/settings/devicelist/battery/PageBatteryDetails.qml
pages/settings/devicelist/battery/PageBatteryHistory.qml
pages/settings/devicelist/battery/PageBatteryModuleAlarms.qml
Expand Down
76 changes: 76 additions & 0 deletions pages/settings/devicelist/battery/PageBattery.qml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ Page {
}
}

ListQuantity {
text: "Current (last 5 minutes avg.)"
dataItem.uid: root.bindPrefix + "/CurrentAvg"
allowed: defaultAllowed && dataItem.isValid
unit: VenusOS.Units_Amp
}

ListQuantity {
//% "Total Capacity"
text: qsTrId("devicelist_battery_total_capacity")
Expand Down Expand Up @@ -195,6 +202,13 @@ Page {
unit: Global.systemSettings.temperatureUnit
}

ListTemperature {
text: "MOSFET Temperature"
dataItem.uid: root.bindPrefix + "/System/MOSTemperature"
allowed: defaultAllowed && dataItem.isValid
unit: Global.systemSettings.temperatureUnit
}

ListTemperature {
//% "Air temperature"
text: qsTrId("battery_air_temp")
Expand Down Expand Up @@ -266,6 +280,54 @@ Page {
secondaryText: Utils.secondsToString(dataItem.value)
}

ListText {
//% "Time-to-SoC 0%"
text: "Time-to-SoC 0%"
allowed: defaultAllowed && dataItem.seen
dataItem.uid: root.bindPrefix + "/TimeToSoC/0"
secondaryText: dataItem.isValid && dataItem.value != "" > 0 ? dataItem.value : "--"
}

ListText {
//% "Time-to-SoC 10%"
text: "Time-to-SoC 10%"
allowed: defaultAllowed && dataItem.seen
dataItem.uid: root.bindPrefix + "/TimeToSoC/10"
secondaryText: dataItem.isValid && dataItem.value != "" > 0 ? dataItem.value : "--"
}

ListText {
//% "Time-to-SoC 20%"
text: "Time-to-SoC 20%"
allowed: defaultAllowed && dataItem.seen
dataItem.uid: root.bindPrefix + "/TimeToSoC/20"
secondaryText: dataItem.isValid && dataItem.value != "" > 0 ? dataItem.value : "--"
}

ListText {
//% "Time-to-SoC 80%"
text: "Time-to-SoC 80%"
allowed: defaultAllowed && dataItem.seen
dataItem.uid: root.bindPrefix + "/TimeToSoC/80"
secondaryText: dataItem.isValid && dataItem.value != "" > 0 ? dataItem.value : "--"
}

ListText {
//% "Time-to-SoC 90%"
text: "Time-to-SoC 90%"
allowed: defaultAllowed && dataItem.seen
dataItem.uid: root.bindPrefix + "/TimeToSoC/90"
secondaryText: dataItem.isValid && dataItem.value != "" > 0 ? dataItem.value : "--"
}

ListText {
//% "Time-to-SoC 100%"
text: "Time-to-SoC 100%"
allowed: defaultAllowed && dataItem.seen
dataItem.uid: root.bindPrefix + "/TimeToSoC/100"
secondaryText: dataItem.isValid && dataItem.value != "" > 0 ? dataItem.value : "--"
}

ListRelayState {
dataItem.uid: root.bindPrefix + "/Relay/0/State"
}
Expand All @@ -289,6 +351,20 @@ Page {
}
}

ListNavigation {
text: "Cell Voltages"
allowed: defaultAllowed && cell3Voltage.isValid
onClicked: {
Global.pageManager.pushPage("/pages/settings/devicelist/battery/PageBatteryCellVoltages.qml",
{ "title": text, "bindPrefix": root.bindPrefix })
}

VeQuickItem {
id: cell3Voltage
uid: root.bindPrefix + "/Voltages/Cell3"
}
}

ListNavigation {
text: CommonWords.alarms
allowed: !root.isParallelBms
Expand Down
Loading

0 comments on commit b4bc8c2

Please sign in to comment.