From dd63a2bf4ccf4f33abee5d518b8c785d2b0ee69a Mon Sep 17 00:00:00 2001 From: Yury Shuvakin Date: Fri, 16 Sep 2022 03:41:01 +0300 Subject: [PATCH] Added display of network settings application status. Added axis indicators for the legend that contains information about the point --- commands.cpp | 5 ++ qml/Controls/ChartView.qml | 5 +- qml/Screens/VisualizationScreen.qml | 16 ++++ translations/cubo_en.ts | 133 +++++++++++++++++----------- translations/cubo_it.ts | 133 +++++++++++++++++----------- translations/cubo_ru.qm | Bin 20915 -> 21261 bytes translations/cubo_ru.ts | 133 +++++++++++++++++----------- 7 files changed, 274 insertions(+), 151 deletions(-) diff --git a/commands.cpp b/commands.cpp index 592c1b8..243a27d 100644 --- a/commands.cpp +++ b/commands.cpp @@ -265,6 +265,11 @@ void Commands::processPacket(QByteArray data) emit netSettingsReceived(settings); break; } + case COMM_SET_BMS_NET_SETTINGS: + { + emit ackReceived(tr("Network settings applied successfully")); + break; + } default: break; } diff --git a/qml/Controls/ChartView.qml b/qml/Controls/ChartView.qml index b358979..0fb5961 100644 --- a/qml/Controls/ChartView.qml +++ b/qml/Controls/ChartView.qml @@ -24,6 +24,9 @@ ChartView { property bool autoScaling: true property int selectedSeriesIndex: 0 + property string infoXMark: "" + property string infoYMark: "" + ValueAxis { id: valueAxisX min: 0 @@ -183,7 +186,7 @@ ChartView { if (currentX < chart.series(selectedSeriesIndex).count && currentX > 0) { selectedPoint = chart.series(selectedSeriesIndex).at(currentX) - currentPointInfoLabel.text = selectedPoint.x + ", " +selectedPoint.y + currentPointInfoLabel.text = selectedPoint.x + " " + infoXMark + ", " + selectedPoint.y + " " + infoYMark } else { currentPointInfo.visible = false } diff --git a/qml/Screens/VisualizationScreen.qml b/qml/Screens/VisualizationScreen.qml index 4e01bb2..98cfb6a 100644 --- a/qml/Screens/VisualizationScreen.qml +++ b/qml/Screens/VisualizationScreen.qml @@ -148,6 +148,8 @@ ColumnLayout { RowLayout { property string xLabel: "" property string yLabel: "" + property string infoXLabel: "" + property string infoYLabel: "" property Controls.ChartView chart: chartView property int seriesCount: 0 property bool horizontalLegend: true @@ -165,6 +167,8 @@ ColumnLayout { Controls.ChartView { id: chartView + infoXMark: infoXLabel + infoYMark: infoYLabel Layout.fillWidth: true Layout.fillHeight: true } @@ -222,6 +226,8 @@ ColumnLayout { Component.onCompleted: { item.xLabel = Qt.binding(function() { return qsTr("Time, s") }) item.yLabel = Qt.binding(function() { return qsTr("Voltage, V") }) + item.infoXLabel = Qt.binding(function() { return qsTr("s") }) + item.infoYLabel = Qt.binding(function() { return qsTr("V") }) } } @@ -235,6 +241,8 @@ ColumnLayout { Component.onCompleted: { item.xLabel = Qt.binding(function() { return qsTr("Time, s") }) item.yLabel = Qt.binding(function() { return qsTr("Current, A") }) + item.infoXLabel = Qt.binding(function() { return qsTr("s") }) + item.infoYLabel = Qt.binding(function() { return qsTr("A") }) } } @@ -248,6 +256,8 @@ ColumnLayout { Component.onCompleted: { item.xLabel = Qt.binding(function() { return qsTr("Time, s") }) item.yLabel = Qt.binding(function() { return qsTr("Temperature, °C") }) + item.infoXLabel = Qt.binding(function() { return qsTr("s") }) + item.infoYLabel = Qt.binding(function() { return qsTr("°C") }) } } @@ -261,6 +271,8 @@ ColumnLayout { Component.onCompleted: { item.xLabel = Qt.binding(function() { return qsTr("Time, s") }) item.yLabel = Qt.binding(function() { return qsTr("Temperature, °C") }) + item.infoXLabel = Qt.binding(function() { return qsTr("s") }) + item.infoYLabel = Qt.binding(function() { return qsTr("°C") }) } } @@ -274,6 +286,8 @@ ColumnLayout { Component.onCompleted: { item.xLabel = Qt.binding(function() { return qsTr("Time, s") }) item.yLabel = Qt.binding(function() { return qsTr("Voltage, V") }) + item.infoXLabel = Qt.binding(function() { return qsTr("s") }) + item.infoYLabel = Qt.binding(function() { return qsTr("V") }) } } @@ -287,6 +301,8 @@ ColumnLayout { Component.onCompleted: { item.xLabel = Qt.binding(function() { return qsTr("Time, s") }) item.yLabel = Qt.binding(function() { return qsTr("Voltage, V") }) + item.infoXLabel = Qt.binding(function() { return qsTr("s") }) + item.infoYLabel = Qt.binding(function() { return qsTr("V") }) item.horizontalLegend = false } } diff --git a/translations/cubo_en.ts b/translations/cubo_en.ts index 26803db..c9fcea8 100644 --- a/translations/cubo_en.ts +++ b/translations/cubo_en.ts @@ -487,45 +487,50 @@ Wait, please. - - - Buffer erase + + Network settings applied successfully + + Buffer erase + + + + Buffer erase timeout - + CRC/Size write - + CRC/Size write timeout - + Firmware data write - + Firmware data write timeout - + Firmware update completed! Reconnect to the board if you want to continue working with it. - + Cancelled @@ -867,115 +872,143 @@ Reconnect to the board if you want to continue working with it. - - - - - - + + + + + + Time, s - - - + + + Voltage, V - + + + + + + + s + + + + + + + V + + + + Current, A - - + + A + + + + + Temperature, °C - + + + °C + + + + Pause data collection - + Resume data collection - + Clear data - + Reset zoom - + Interval, s - - + + Cell # - - + + Voltage indicator - - + + Current indicator - - - - + + + + Maximum temperature - - - - + + + + Average temperature - - - - + + + + Minimum temperature - - + + Maximum voltage - - + + Average voltage - - + + Minimum voltage diff --git a/translations/cubo_it.ts b/translations/cubo_it.ts index eea02ed..16ba504 100644 --- a/translations/cubo_it.ts +++ b/translations/cubo_it.ts @@ -487,45 +487,50 @@ Wait, please. - - - Buffer erase + + Network settings applied successfully + + Buffer erase + + + + Buffer erase timeout - + CRC/Size write - + CRC/Size write timeout - + Firmware data write - + Firmware data write timeout - + Firmware update completed! Reconnect to the board if you want to continue working with it. - + Cancelled @@ -867,115 +872,143 @@ Reconnect to the board if you want to continue working with it. - - - - - - + + + + + + Time, s - - - + + + Voltage, V - + + + + + + + s + + + + + + + V + + + + Current, A - - + + A + + + + + Temperature, °C - + + + °C + + + + Pause data collection - + Resume data collection - + Clear data - + Reset zoom - + Interval, s - - + + Cell # - - + + Voltage indicator - - + + Current indicator - - - - + + + + Maximum temperature - - - - + + + + Average temperature - - - - + + + + Minimum temperature - - + + Maximum voltage - - + + Average voltage - - + + Minimum voltage diff --git a/translations/cubo_ru.qm b/translations/c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eX{L!#sa?tYGDHc`dy I=SuVb2kNpW6951J delta 885 zcmXAnYe-XJ9LAq>t8s|#rM%Zb z5$9gyy$z{=v4-!G)pVVf?@FZoE|XxS0I>Lr;2t1#mO-H*Q46J$HHX`O&zUIu11!23 zq~($_%^DgV9isN|Vqi{%xLTeE*msFX91eOxh$s5VXhw z3dC+7y@Mq}?29MKmSRaWQ$x9DNoj_=RD@5`hFFR(1-WloaIX2@yk57{$60#GfJJ#Lbb zS|pd}(s_Ns^HFu4wY0^Vo z^{JZIMFAQ{Q3+8_mzrJhje1?B-uRLn#~)LlsO+VwImpbnYTwu^y4xEjKcuc$i^C#Q z-T?Z+Fl`_}=X7B)&$_5X>y=6&im@n7LL8eP Конфигурация BMS установлена - - + + Network settings applied successfully + Настройки сети успешно применены + + + + Buffer erase Стирание буфера - + Buffer erase timeout Таймаут стирания буфера - + CRC/Size write Запись контрольной суммы - + CRC/Size write timeout Таймаут записи контрольной суммы - + Firmware data write Запись данных прошивки - + Firmware data write timeout Таймаут записи данных прошивки - + Firmware update completed! Reconnect to the board if you want to continue working with it. @@ -548,7 +553,7 @@ Reconnect to the board if you want to continue working with it. Обновление прошивки завершено - + Cancelled Отменено @@ -902,115 +907,143 @@ Reconnect to the board if you want to continue working with it. Список ячеек - - - - - - + + + + + + Time, s Время, c - - - + + + Voltage, V Напряжение, В - + + + + + + + s + с + + + + + + V + В + + + Current, A Ток, А - - + + A + А + + + + Temperature, °C Температура, °C - + + + °C + °C + + + Pause data collection Приостановить сбор данных - + Resume data collection Продолжить сбор данных - + Clear data Очистить данные - + Reset zoom Сбросить масштаб - + Interval, s Интервал, с - - + + Cell # Ячейка № - - + + Voltage indicator Показатель вольтажа - - + + Current indicator Показатель тока - - - - + + + + Maximum temperature Максимальная температура - - - - + + + + Average temperature Средняя температура - - - - + + + + Minimum temperature Минимальная температура - - + + Maximum voltage Максимальное напряжение - - + + Average voltage Среднее напряжение - - + + Minimum voltage Минимальное напряжение