diff --git a/FileSets/VersionIndependent/DetailBattery.qml b/FileSets/VersionIndependent/DetailBattery.qml index 60643ed3..b54beb35 100644 --- a/FileSets/VersionIndependent/DetailBattery.qml +++ b/FileSets/VersionIndependent/DetailBattery.qml @@ -27,7 +27,6 @@ MbPage property real essDimOpacity: 0.2 VBusItem { id: timeToGo; bind: Utils.path(systemPrefix,"/Dc/Battery/TimeToGo") } - VBusItem { id: consumedAh; bind: Utils.path(systemPrefix,"/Dc/Battery/ConsumedAmphours") } VBusItem { id: systemType; bind: Utils.path(systemPrefix, "/SystemType") } VBusItem { id: lowSoc; bind: Utils.path(systemPrefix, "/SystemState/LowSoc") } @@ -40,8 +39,14 @@ MbPage VBusItem { id: batteryServiceItem; bind: Utils.path(systemPrefix, "/Dc/Battery/BatteryService") } property string batteryService: batteryServiceItem.valid ? batteryServiceItem.value : "" - VBusItem { id: batteryCapacityItem; bind: Utils.path(batteryService, "/InstalledCapacity") } - property bool showAhRemaining: batteryCapacityItem.valid + + VBusItem { id: capacityItem; bind: Utils.path(batteryService,"/Capacity") } + VBusItem { id: installedCapacityItem; bind: Utils.path(batteryService, "/InstalledCapacity") } + property real capacity: capacityItem.valid ? capacityItem.value : ( installedCapacityItem.valid ? installedCapacityItem.value : 0 ) + VBusItem { id: consumedItem; bind: Utils.path(systemPrefix,"/Dc/Battery/ConsumedAmphours") } + property bool showCapacity: capacity != 0 + property bool showAhRemaining: showCapacity && consumedItem.valid + VBusItem { id: minimumCellVoltageItem; bind: Utils.path(batteryService, "/System/MinCellVoltage") } VBusItem { id: maximumCellVoltageItem; bind: Utils.path(batteryService, "/System/MaxCellVoltage") } property bool showCellVoltages: minimumCellVoltageItem.valid && maximumCellVoltageItem.valid @@ -117,16 +122,16 @@ MbPage { Text { font.pixelSize: 12; font.bold: true; color: "black" width: rowTitleWidth; horizontalAlignment: Text.AlignRight - text: qsTr ("Consumed") } + text: showCapacity ? qsTr ("Consumed") : ""} Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter - text: EnhFmt.formatVBusItemAbs (consumedAh, "AH") } + text: showCapacity ? EnhFmt.formatValue (capacity, "AH") : "" } Text { font.pixelSize: 12; font.bold: true; color: "black" width: rowTitleWidth; horizontalAlignment: Text.AlignRight text: showAhRemaining ? qsTr ("Remaining") : "" } Text { font.pixelSize: 12; font.bold: true; color: "black" width: tableColumnWidth; horizontalAlignment: Text.AlignHCenter; - text: showAhRemaining ? EnhFmt.formatValue (batteryCapacityItem.value - consumedAh.value, "AH") : "" + text: showAhRemaining ? EnhFmt.formatValue (capacity - consumedItem.value, "AH") : "" } } diff --git a/changes b/changes index 998cc90e..c866472b 100644 --- a/changes +++ b/changes @@ -1,7 +1,13 @@ +v10.60: + fixed (maybe): battery detail not showing consumed and remaining with some batteries + v10.59: add support for v3.50~5 add support for v3.50~7 +v10.59: + add support for v3.50~3 + 10.56/10.57: (10.56 had a version of v10.5) add support for v3.40 dropping support for firmware earlier than v3.10 diff --git a/version b/version index 400e8f19..a6d774f6 100644 --- a/version +++ b/version @@ -1 +1 @@ -v10.59 +v10.60