|
@@ -25,6 +25,8 @@ from utils.qt import QTimer, QThread, QColor, Qt, QDateTime, QtGui, QtWidgets, Q
|
|
from utils.hex_bit import a_bit
|
|
from utils.hex_bit import a_bit
|
|
from worker.bms_work import BmsSend, BmsReceived
|
|
from worker.bms_work import BmsSend, BmsReceived
|
|
from ui.own.palette_theme import set_edt_bg
|
|
from ui.own.palette_theme import set_edt_bg
|
|
|
|
+import csv
|
|
|
|
+
|
|
|
|
|
|
class BmsHomeControll:
|
|
class BmsHomeControll:
|
|
def __init__(self):
|
|
def __init__(self):
|
|
@@ -334,31 +336,31 @@ class BmsHomeControll:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.over_cell_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.over_cell_warn, QColor(Qt.yellow))
|
|
|
|
|
|
# 总压过压告警
|
|
# 总压过压告警
|
|
- if (data[0] & 0x0C >> 2) == 0:
|
|
|
|
|
|
+ if ((data[0] & 0x0C) >> 2) == 0:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.hv_warn, QColor(Qt.gray))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.hv_warn, QColor(Qt.gray))
|
|
- elif (data[0] & 0x0C >> 2) == 1:
|
|
|
|
|
|
+ elif ((data[0] & 0x0C) >> 2) == 1:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.hv_warn, QColor(Qt.red))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.hv_warn, QColor(Qt.red))
|
|
- elif (data[0] & 0x0C >> 2) == 2:
|
|
|
|
|
|
+ elif ((data[0] & 0x0C) >> 2) == 2:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.hv_warn, QColor(Qt.magenta))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.hv_warn, QColor(Qt.magenta))
|
|
else:
|
|
else:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.hv_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.hv_warn, QColor(Qt.yellow))
|
|
|
|
|
|
# 单体欠压告警
|
|
# 单体欠压告警
|
|
- if (data[0] & 0x30 >> 4) == 0:
|
|
|
|
|
|
+ if ((data[0] & 0x30) >> 4) == 0:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.under_cell_warn, QColor(Qt.gray))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.under_cell_warn, QColor(Qt.gray))
|
|
- elif (data[0] & 0x30 >> 4) == 1:
|
|
|
|
|
|
+ elif ((data[0] & 0x30) >> 4) == 1:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.under_cell_warn, QColor(Qt.red))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.under_cell_warn, QColor(Qt.red))
|
|
- elif (data[0] & 0x30 >> 4) == 2:
|
|
|
|
|
|
+ elif ((data[0] & 0x30) >> 4) == 2:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.under_cell_warn, QColor(Qt.magenta))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.under_cell_warn, QColor(Qt.magenta))
|
|
else:
|
|
else:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.under_cell_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.under_cell_warn, QColor(Qt.yellow))
|
|
|
|
|
|
# 总压欠压告警
|
|
# 总压欠压告警
|
|
- if (data[0] & 0xC0 >> 6) == 0:
|
|
|
|
|
|
+ if ((data[0] & 0xC0) >> 6) == 0:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.lv_warn, QColor(Qt.gray))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.lv_warn, QColor(Qt.gray))
|
|
- elif (data[0] & 0xC0 >> 6) == 1:
|
|
|
|
|
|
+ elif ((data[0] & 0xC0) >> 6) == 1:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.lv_warn, QColor(Qt.red))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.lv_warn, QColor(Qt.red))
|
|
- elif (data[0] & 0xC0 >> 6) == 2:
|
|
|
|
|
|
+ elif ((data[0] & 0xC0) >> 6) == 2:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.lv_warn, QColor(Qt.magenta))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.lv_warn, QColor(Qt.magenta))
|
|
else:
|
|
else:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.lv_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.lv_warn, QColor(Qt.yellow))
|
|
@@ -375,31 +377,31 @@ class BmsHomeControll:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.chg_lt_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.chg_lt_warn, QColor(Qt.yellow))
|
|
|
|
|
|
# 充电高温告警
|
|
# 充电高温告警
|
|
- if (data[1] & 0x0C >> 2) == 0:
|
|
|
|
|
|
+ if ((data[1] & 0x0C) >> 2) == 0:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.chg_ht_warn, QColor(Qt.gray))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.chg_ht_warn, QColor(Qt.gray))
|
|
- elif (data[1] & 0x0C >> 2) == 1:
|
|
|
|
|
|
+ elif ((data[1] & 0x0C) >> 2) == 1:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.chg_ht_warn, QColor(Qt.red))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.chg_ht_warn, QColor(Qt.red))
|
|
- elif (data[1] & 0x0C >> 2) == 2:
|
|
|
|
|
|
+ elif ((data[1] & 0x0C) >> 2) == 2:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.chg_ht_warn, QColor(Qt.magenta))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.chg_ht_warn, QColor(Qt.magenta))
|
|
else:
|
|
else:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.chg_ht_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.chg_ht_warn, QColor(Qt.yellow))
|
|
|
|
|
|
# 放电低温告警
|
|
# 放电低温告警
|
|
- if (data[1] & 0x30 >> 4) == 0:
|
|
|
|
|
|
+ if ((data[1] & 0x30) >> 4) == 0:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_lt_warn, QColor(Qt.gray))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_lt_warn, QColor(Qt.gray))
|
|
- elif (data[1] & 0x30 >> 4) == 1:
|
|
|
|
|
|
+ elif ((data[1] & 0x30) >> 4) == 1:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_lt_warn, QColor(Qt.red))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_lt_warn, QColor(Qt.red))
|
|
- elif (data[1] & 0x30 >> 4) == 2:
|
|
|
|
|
|
+ elif ((data[1] & 0x30) >> 4) == 2:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_lt_warn, QColor(Qt.magenta))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_lt_warn, QColor(Qt.magenta))
|
|
else:
|
|
else:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_lt_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_lt_warn, QColor(Qt.yellow))
|
|
|
|
|
|
# 放电高温告警
|
|
# 放电高温告警
|
|
- if (data[1] & 0xC0 >> 6) == 0:
|
|
|
|
|
|
+ if ((data[1] & 0xC0) >> 6) == 0:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_ht_warn, QColor(Qt.gray))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_ht_warn, QColor(Qt.gray))
|
|
- elif (data[1] & 0xC0 >> 6) == 1:
|
|
|
|
|
|
+ elif ((data[1] & 0xC0) >> 6) == 1:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_ht_warn, QColor(Qt.red))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_ht_warn, QColor(Qt.red))
|
|
- elif (data[1] & 0xC0 >> 6) == 2:
|
|
|
|
|
|
+ elif ((data[1] & 0xC0) >> 6) == 2:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_ht_warn, QColor(Qt.magenta))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_ht_warn, QColor(Qt.magenta))
|
|
else:
|
|
else:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_ht_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_ht_warn, QColor(Qt.yellow))
|
|
@@ -416,31 +418,31 @@ class BmsHomeControll:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.chg_hcur_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.chg_hcur_warn, QColor(Qt.yellow))
|
|
|
|
|
|
# 放电过流告警
|
|
# 放电过流告警
|
|
- if (data[2] & 0x0C >> 2) == 0:
|
|
|
|
|
|
+ if ((data[2] & 0x0C) >> 2) == 0:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_hcur_warn, QColor(Qt.gray))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_hcur_warn, QColor(Qt.gray))
|
|
- elif (data[2] & 0x0C >> 2) == 1:
|
|
|
|
|
|
+ elif ((data[2] & 0x0C) >> 2) == 1:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_hcur_warn, QColor(Qt.red))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_hcur_warn, QColor(Qt.red))
|
|
- elif (data[2] & 0x0C >> 2) == 2:
|
|
|
|
|
|
+ elif ((data[2] & 0x0C) >> 2) == 2:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_hcur_warn, QColor(Qt.magenta))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_hcur_warn, QColor(Qt.magenta))
|
|
else:
|
|
else:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_hcur_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.dchg_hcur_warn, QColor(Qt.yellow))
|
|
|
|
|
|
# 单体压差告警
|
|
# 单体压差告警
|
|
- if (data[2] & 0x30 >> 4) == 0:
|
|
|
|
|
|
+ if ((data[2] & 0x30) >> 4) == 0:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_vol_warn, QColor(Qt.gray))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_vol_warn, QColor(Qt.gray))
|
|
- elif (data[2] & 0x30 >> 4) == 1:
|
|
|
|
|
|
+ elif ((data[2] & 0x30) >> 4) == 1:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_vol_warn, QColor(Qt.red))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_vol_warn, QColor(Qt.red))
|
|
- elif (data[2] & 0x30 >> 4) == 2:
|
|
|
|
|
|
+ elif ((data[2] & 0x30) >> 4) == 2:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_vol_warn, QColor(Qt.magenta))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_vol_warn, QColor(Qt.magenta))
|
|
else:
|
|
else:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_vol_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_vol_warn, QColor(Qt.yellow))
|
|
|
|
|
|
# 单体温差告警
|
|
# 单体温差告警
|
|
- if (data[2] & 0xC0 >> 6) == 0:
|
|
|
|
|
|
+ if ((data[2] & 0xC0) >> 6) == 0:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_temp_warn, QColor(Qt.gray))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_temp_warn, QColor(Qt.gray))
|
|
- elif (data[2] & 0xC0 >> 6) == 1:
|
|
|
|
|
|
+ elif ((data[2] & 0xC0) >> 6) == 1:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_temp_warn, QColor(Qt.red))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_temp_warn, QColor(Qt.red))
|
|
- elif (data[2] & 0xC0 >> 6) == 2:
|
|
|
|
|
|
+ elif ((data[2] & 0xC0) >> 6) == 2:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_temp_warn, QColor(Qt.magenta))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_temp_warn, QColor(Qt.magenta))
|
|
else:
|
|
else:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_temp_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.diff_cell_temp_warn, QColor(Qt.yellow))
|
|
@@ -457,31 +459,31 @@ class BmsHomeControll:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.against_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.against_warn, QColor(Qt.yellow))
|
|
|
|
|
|
# 正极绝缘过低报警
|
|
# 正极绝缘过低报警
|
|
- if (data[3] & 0x0C >> 2) == 0:
|
|
|
|
|
|
+ if ((data[3] & 0x0C) >> 2) == 0:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.gray))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.gray))
|
|
- elif (data[3] & 0x0C >> 2) == 1:
|
|
|
|
|
|
+ elif ((data[3] & 0x0C) >> 2) == 1:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.red))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.red))
|
|
- elif (data[3] & 0x0C >> 2) == 2:
|
|
|
|
|
|
+ elif ((data[3] & 0x0C) >> 2) == 2:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.magenta))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.magenta))
|
|
else:
|
|
else:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.yellow))
|
|
|
|
|
|
# 负极绝缘过低报警
|
|
# 负极绝缘过低报警
|
|
- if (data[3] & 0x30 >> 4) == 0:
|
|
|
|
|
|
+ if ((data[3] & 0x30) >> 4) == 0:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.gray))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.gray))
|
|
- elif (data[3] & 0x30 >> 4) == 1:
|
|
|
|
|
|
+ elif ((data[3] & 0x30) >> 4) == 1:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.red))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.red))
|
|
- elif (data[3] & 0x30 >> 4) == 2:
|
|
|
|
|
|
+ elif ((data[3] & 0x30) >> 4) == 2:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.magenta))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.magenta))
|
|
else:
|
|
else:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.p_against_warn, QColor(Qt.yellow))
|
|
|
|
|
|
# 极柱温度过高
|
|
# 极柱温度过高
|
|
- if (data[3] & 0xC0 >> 6) == 0:
|
|
|
|
|
|
+ if ((data[3] & 0xC0) >> 6) == 0:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.jz_ht_warn, QColor(Qt.gray))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.jz_ht_warn, QColor(Qt.gray))
|
|
- elif (data[3] & 0xC0 >> 6) == 1:
|
|
|
|
|
|
+ elif ((data[3] & 0xC0) >> 6) == 1:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.jz_ht_warn, QColor(Qt.red))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.jz_ht_warn, QColor(Qt.red))
|
|
- elif (data[3] & 0xC0 >> 6) == 2:
|
|
|
|
|
|
+ elif ((data[3] & 0xC0) >> 6) == 2:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.jz_ht_warn, QColor(Qt.magenta))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.jz_ht_warn, QColor(Qt.magenta))
|
|
else:
|
|
else:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.jz_ht_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.jz_ht_warn, QColor(Qt.yellow))
|
|
@@ -653,11 +655,11 @@ class BmsHomeControll:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.ccu_ht_warn, QColor(Qt.red))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.ccu_ht_warn, QColor(Qt.red))
|
|
|
|
|
|
# MOS温度过高故障
|
|
# MOS温度过高故障
|
|
- if (data[7] & 0x18 >> 3) == 0:
|
|
|
|
|
|
+ if ((data[7] & 0x18) >> 3) == 0:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.mos_ht_warn, QColor(Qt.gray))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.mos_ht_warn, QColor(Qt.gray))
|
|
- elif (data[7] & 0x18 >> 3) == 1:
|
|
|
|
|
|
+ elif ((data[7] & 0x18) >> 3) == 1:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.mos_ht_warn, QColor(Qt.red))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.mos_ht_warn, QColor(Qt.red))
|
|
- elif (data[2] & 0x18 >> 3) == 2:
|
|
|
|
|
|
+ elif ((data[2] & 0x18) >> 3) == 2:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.mos_ht_warn, QColor(Qt.magenta))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.mos_ht_warn, QColor(Qt.magenta))
|
|
else:
|
|
else:
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.mos_ht_warn, QColor(Qt.yellow))
|
|
set_edt_bg(self.bms_main_ctl._view.center_widget.mos_ht_warn, QColor(Qt.yellow))
|
|
@@ -1262,6 +1264,39 @@ class BmsHomeControll:
|
|
text = dataTime.toString("yyyy-MM-dd HH:mm:ss")
|
|
text = dataTime.toString("yyyy-MM-dd HH:mm:ss")
|
|
self._model.now_time = text
|
|
self._model.now_time = text
|
|
|
|
|
|
|
|
+ if SD.RECORD_SAVE:
|
|
|
|
+ record_data = []
|
|
|
|
+ record_data.append(self._model.now_time)
|
|
|
|
+ record_data.append(self._model.ccu_id)
|
|
|
|
+ record_data.append(self._model.fault_level)
|
|
|
|
+ record_data.append(self._model.volt)
|
|
|
|
+ record_data.append(self._model.cur)
|
|
|
|
+ record_data.append(self._model.soc)
|
|
|
|
+ record_data.append(self._model.soh)
|
|
|
|
+ record_data.append(self._model.avg_cell_volt)
|
|
|
|
+ record_data.append(self._model.max_cell_volt_id)
|
|
|
|
+ record_data.append(self._model.max_cell_volt)
|
|
|
|
+ record_data.append(self._model.min_cell_volt_id)
|
|
|
|
+ record_data.append(self._model.min_cell_volt)
|
|
|
|
+ record_data.append(self._model.avg_cell_temp)
|
|
|
|
+ record_data.append(self._model.max_cell_temp_id)
|
|
|
|
+ record_data.append(self._model.max_cell_temp)
|
|
|
|
+ record_data.append(self._model.min_cell_temp_id)
|
|
|
|
+ record_data.append(self._model.min_cell_temp)
|
|
|
|
+ record_data.append(self._model.p)
|
|
|
|
+ record_data.append(self._model.n)
|
|
|
|
+ record_data.append(self._model.pre)
|
|
|
|
+ record_data.append(self._model.dlq)
|
|
|
|
+ record_data.append(self._model.gjd_first)
|
|
|
|
+ record_data.append(self._model.gjd_second)
|
|
|
|
+ record_data.append(self._model.max_soc)
|
|
|
|
+ record_data.append(self._model.min_soc)
|
|
|
|
+ record_data.append(self._model.avg_soc)
|
|
|
|
+ record_data.extend(self._model.cell_volt)
|
|
|
|
+ record_data.extend(self._model.cell_temp)
|
|
|
|
+ with open(SD.RECORD_NAME, 'a') as csvfile:
|
|
|
|
+ writer = csv.writer(csvfile, dialect='excel', lineterminator='\n')
|
|
|
|
+ writer.writerow(record_data)
|
|
|
|
|
|
def run(self):
|
|
def run(self):
|
|
self._view.show()
|
|
self._view.show()
|