diff --git a/qml/Screens/BmsSettingsScreen.qml b/qml/Screens/BmsSettingsScreen.qml index fb5f5f5..bcb9c0d 100644 --- a/qml/Screens/BmsSettingsScreen.qml +++ b/qml/Screens/BmsSettingsScreen.qml @@ -102,52 +102,52 @@ RowLayout { Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2 } - Repeater { - id: bmsSensorsMaskRepeater + // Repeater { + // id: bmsSensorsMaskRepeater - property var bmsSensorsMaskModel: [] + // property var bmsSensorsMaskModel: [] - ColumnLayout { - id: bmsSensorsMaskLayout - Layout.fillWidth: true + // ColumnLayout { + // id: bmsSensorsMaskLayout + // Layout.fillWidth: true - property var boardIndex: index + // property var boardIndex: index - Controls.SubtitleLabel { - text: index === 0 ? qsTr("BMS sensors mask for master board") : qsTr("BMS sensors mask for slave board #") + index - maximumLineCount: 2 - wrapMode: Text.WordWrap - Layout.fillWidth: true - } + // Controls.SubtitleLabel { + // text: index === 0 ? qsTr("BMS sensors mask for master board") : qsTr("BMS sensors mask for slave board #") + index + // maximumLineCount: 2 + // wrapMode: Text.WordWrap + // Layout.fillWidth: true + // } - Controls.Frame { - padding: 10 - Layout.fillWidth: true - Layout.fillHeight: true + // Controls.Frame { + // padding: 10 + // Layout.fillWidth: true + // Layout.fillHeight: true - ColumnLayout { - spacing: 10 - anchors.fill: parent + // ColumnLayout { + // spacing: 10 + // anchors.fill: parent - Repeater { - model: 4 - Controls.CheckBox { - text: qsTr("#") + (index + 1) - opacity: (bmsSensorsMaskLayout.boardIndex === 0 && (index === 2 || index === 3)) ? 0 : 1 - enabled: opacity - checked: bmsSensorsMaskRepeater.bmsSensorsMaskModel[bmsSensorsMaskLayout.boardIndex * 4 + index] - onCheckedChanged: bmsSensorsMaskRepeater.bmsSensorsMaskModel[bmsSensorsMaskLayout.boardIndex * 4 + index] = checked - } - } + // Repeater { + // model: 4 + // Controls.CheckBox { + // text: qsTr("#") + (index + 1) + // opacity: (bmsSensorsMaskLayout.boardIndex === 0 && (index === 2 || index === 3)) ? 0 : 1 + // enabled: opacity + // checked: bmsSensorsMaskRepeater.bmsSensorsMaskModel[bmsSensorsMaskLayout.boardIndex * 4 + index] + // onCheckedChanged: bmsSensorsMaskRepeater.bmsSensorsMaskModel[bmsSensorsMaskLayout.boardIndex * 4 + index] = checked + // } + // } - Item { - visible: index === 0 - Layout.fillHeight: true - } - } - } - } - } + // Item { + // visible: index === 0 + // Layout.fillHeight: true + // } + // } + // } + // } + // } Repeater { id: batterySensorsMaskRepeater @@ -197,17 +197,17 @@ RowLayout { } function recalculateSensorsMasks() { - const bmsSensorsModel = bmsSensorsMaskRepeater.bmsSensorsMaskModel + // const bmsSensorsModel = bmsSensorsMaskRepeater.bmsSensorsMaskModel const batterySensorsModel = batterySensorsMaskRepeater.batterySensorsMaskModel const newSize = parseInt(numberOfBoardsField.text) * 4 if (newSize) { - arrayResize(bmsSensorsModel, newSize, false) + // arrayResize(bmsSensorsModel, newSize, false) arrayResize(batterySensorsModel, newSize, true) - bmsSensorsMaskRepeater.model = 0 - bmsSensorsMaskRepeater.bmsSensorsMaskModel = bmsSensorsModel - bmsSensorsMaskRepeater.model = parseInt(numberOfBoardsField.text) + // bmsSensorsMaskRepeater.model = 0 + // bmsSensorsMaskRepeater.bmsSensorsMaskModel = bmsSensorsModel + // bmsSensorsMaskRepeater.model = parseInt(numberOfBoardsField.text) batterySensorsMaskRepeater.model = 0 batterySensorsMaskRepeater.batterySensorsMaskModel = batterySensorsModel @@ -394,7 +394,7 @@ RowLayout { } Controls.SubtitleLabel { - text: qsTr("Upper enable threshold (should be higher than disable), V") + text: qsTr("Upper enable threshold (should be lower than disable), V") maximumLineCount: 3 wrapMode: Text.WordWrap Layout.fillWidth: true @@ -940,26 +940,26 @@ RowLayout { BmsInterface.bmsConfig().setParamValue("noOfCellsSeries", parseInt(numberOfCellsField.text)) const numberOfBoards = parseInt(numberOfBoardsField.text) - const bmsSensorsModel = bmsSensorsMaskRepeater.bmsSensorsMaskModel + // const bmsSensorsModel = bmsSensorsMaskRepeater.bmsSensorsMaskModel const batterySensorsModel = batterySensorsMaskRepeater.batterySensorsMaskModel - let bmsSensorsMask = 0 + // let bmsSensorsMask = 0 let batterySensorsMask = 0 for (let i = 0; i < numberOfBoards * 4; ++i) { - bmsSensorsMask |= Number(bmsSensorsModel[i]) << i + // bmsSensorsMask |= Number(bmsSensorsModel[i]) << i batterySensorsMask |= Number(batterySensorsModel[i]) << i } // disable 3 and 4 sensor for master - bmsSensorsMask = bmsSensorsMask & ~(1 << 2) - bmsSensorsMask = bmsSensorsMask & ~(1 << 3) + // bmsSensorsMask = bmsSensorsMask & ~(1 << 2) + // bmsSensorsMask = bmsSensorsMask & ~(1 << 3) batterySensorsMask = batterySensorsMask & ~(1 << 2) batterySensorsMask = batterySensorsMask & ~(1 << 3) - print(bmsSensorsMask, batterySensorsMask) + // print(bmsSensorsMask, batterySensorsMask) - BmsInterface.bmsConfig().setParamValue("tempEnableMaskBMS", bmsSensorsMask) + // BmsInterface.bmsConfig().setParamValue("tempEnableMaskBMS", bmsSensorsMask) BmsInterface.bmsConfig().setParamValue("tempEnableMaskBattery", batterySensorsMask) BmsInterface.bmsConfig().setParamValue("noOfCellsParallel", parseInt(numberOfParallelCellsField.text)) @@ -1008,17 +1008,17 @@ RowLayout { const numberOfBoards = BmsInterface.bmsConfig().getParamInt("cellMonitorICCount") const numberOfSensorsPerBoard = BmsInterface.bmsConfig().getParamInt("noOfTempSensorPerModule") - const bmsSensorsMask = BmsInterface.bmsConfig().getParamInt("tempEnableMaskBMS") + // const bmsSensorsMask = BmsInterface.bmsConfig().getParamInt("tempEnableMaskBMS") const batterySensorsMask = BmsInterface.bmsConfig().getParamInt("tempEnableMaskBattery") - const bmsSensorsModel = [] + // const bmsSensorsModel = [] const batterySensorsModel = [] for (let i = 0; i < numberOfBoards * numberOfSensorsPerBoard; ++i) { - bmsSensorsModel.push((bmsSensorsMask & (1 << i)) != 0) + // bmsSensorsModel.push((bmsSensorsMask & (1 << i)) != 0) batterySensorsModel.push((batterySensorsMask & (1 << i)) != 0) } - bmsSensorsMaskRepeater.bmsSensorsMaskModel = bmsSensorsModel + // bmsSensorsMaskRepeater.bmsSensorsMaskModel = bmsSensorsModel batterySensorsMaskRepeater.batterySensorsMaskModel = batterySensorsModel numberOfParallelCellsField.text = BmsInterface.bmsConfig().getParamInt("noOfCellsParallel") diff --git a/qml/Screens/TemperatureMonitorScreen.qml b/qml/Screens/TemperatureMonitorScreen.qml index 06c795c..15d98dc 100644 --- a/qml/Screens/TemperatureMonitorScreen.qml +++ b/qml/Screens/TemperatureMonitorScreen.qml @@ -24,7 +24,7 @@ Item { Layout.rightMargin: 10 GridLayout { - columns: 2 + columns: 1 // 2 columnSpacing: 70 rowSpacing: 15 anchors.fill: parent @@ -45,27 +45,27 @@ Item { } Layout.fillWidth: true - Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2 + // Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2 } - RowLayout { - spacing: 10 - Controls.ContentLabel { - text: qsTr("Minimum BMS temperature, °C") - } + // RowLayout { + // spacing: 10 + // Controls.ContentLabel { + // text: qsTr("Minimum BMS temperature, °C") + // } - Controls.DotSeparator { - Layout.fillWidth: true - } + // Controls.DotSeparator { + // Layout.fillWidth: true + // } - Controls.SubtitleLabel { - id: minBmsTemperatureLabel - text: "-" - } + // Controls.SubtitleLabel { + // id: minBmsTemperatureLabel + // text: "-" + // } - Layout.fillWidth: true - Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2 - } + // Layout.fillWidth: true + // Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2 + // } RowLayout { spacing: 10 @@ -83,27 +83,27 @@ Item { } Layout.fillWidth: true - Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2 + // Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2 } - RowLayout { - spacing: 10 - Controls.ContentLabel { - text: qsTr("Average BMS temperature, °C") - } + // RowLayout { + // spacing: 10 + // Controls.ContentLabel { + // text: qsTr("Average BMS temperature, °C") + // } - Controls.DotSeparator { - Layout.fillWidth: true - } + // Controls.DotSeparator { + // Layout.fillWidth: true + // } - Controls.SubtitleLabel { - id: avgBmsTemperatureLabel - text: "-" - } + // Controls.SubtitleLabel { + // id: avgBmsTemperatureLabel + // text: "-" + // } - Layout.fillWidth: true - Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2 - } + // Layout.fillWidth: true + // Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2 + // } RowLayout { spacing: 10 @@ -121,29 +121,29 @@ Item { } Layout.fillWidth: true - Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2 + // Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2 } - RowLayout { - spacing: 10 - Controls.ContentLabel { - text: qsTr("Maximum BMS temperature, °C") - } + // RowLayout { + // spacing: 10 + // Controls.ContentLabel { + // text: qsTr("Maximum BMS temperature, °C") + // } - Controls.DotSeparator { - Layout.fillWidth: true - } + // Controls.DotSeparator { + // Layout.fillWidth: true + // } - Controls.SubtitleLabel { - id: maxBmsTemperatureLabel - text: "-" - } + // Controls.SubtitleLabel { + // id: maxBmsTemperatureLabel + // text: "-" + // } - Layout.fillWidth: true - Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2 - } + // Layout.fillWidth: true + // Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2 + // } } } @@ -230,9 +230,9 @@ Item { avgBatteryTemperatureLabel.text = MathHelper.roundDouble(values.tempBattAverage) minBatteryTemperatureLabel.text = MathHelper.roundDouble(values.tempBattLow) - maxBmsTemperatureLabel.text = MathHelper.roundDouble(values.tempBMSHigh) - avgBmsTemperatureLabel.text = MathHelper.roundDouble(values.tempBMSAverage) - minBmsTemperatureLabel.text = MathHelper.roundDouble(values.tempBMSLow) + // maxBmsTemperatureLabel.text = MathHelper.roundDouble(values.tempBMSHigh) + // avgBmsTemperatureLabel.text = MathHelper.roundDouble(values.tempBMSAverage) + // minBmsTemperatureLabel.text = MathHelper.roundDouble(values.tempBMSLow) } onAuxReceived: { diff --git a/translations/cubo_en.qm b/translations/cubo_en.qm index 9dad8df..937ea3e 100644 Binary files a/translations/cubo_en.qm and b/translations/cubo_en.qm differ diff --git a/translations/cubo_en.ts b/translations/cubo_en.ts index 3eaaa01..f107d6e 100644 --- a/translations/cubo_en.ts +++ b/translations/cubo_en.ts @@ -317,11 +317,6 @@ Lower enable threshold (should be higher than disable), V - - - Upper enable threshold (should be higher than disable), V - - @@ -478,6 +473,11 @@ Wait, please. Battery sensors mask for slave board # + + + Upper enable threshold (should be lower than disable), V + + Calibrate "0" diff --git a/translations/cubo_it.qm b/translations/cubo_it.qm index 9dad8df..a732b90 100644 Binary files a/translations/cubo_it.qm and b/translations/cubo_it.qm differ diff --git a/translations/cubo_it.ts b/translations/cubo_it.ts index 55e4344..90fb097 100644 --- a/translations/cubo_it.ts +++ b/translations/cubo_it.ts @@ -317,11 +317,6 @@ Lower enable threshold (should be higher than disable), V - - - Upper enable threshold (should be higher than disable), V - - @@ -478,6 +473,11 @@ Wait, please. Battery sensors mask for slave board # + + + Upper enable threshold (should be lower than disable), V + + Calibrate "0" diff --git a/translations/cubo_ru.qm b/translations/cubo_ru.qm index 8bd9399..c4b58d0 100644 Binary files a/translations/cubo_ru.qm and b/translations/cubo_ru.qm differ diff --git a/translations/cubo_ru.ts b/translations/cubo_ru.ts index 11fd8de..85bfa2f 100644 --- a/translations/cubo_ru.ts +++ b/translations/cubo_ru.ts @@ -350,9 +350,8 @@ Нижний порог включения (должен быть выше отключения), В - Upper enable threshold (should be higher than disable), V - Верхний порог включения (должен быть выше отключения), В + Верхний порог включения (должен быть выше отключения), В @@ -523,6 +522,11 @@ Wait, please. Battery sensors mask for slave board # Маска сенсоров батареи для дополнительной платы № + + + Upper enable threshold (should be lower than disable), V + Верхний порог включения (должен быть ниже отключения), В + Calibrate "0"