|
@@ -103,42 +103,42 @@ class BmsSend(QObject):
|
|
|
class BmsReceived(QObject):
|
|
|
|
|
|
to_show_masterid_signal = Signal(int)
|
|
|
- to_show_0000_signal = Signal(object)
|
|
|
- to_show_0001_signal = Signal(object)
|
|
|
- to_show_0002_signal = Signal(object)
|
|
|
- to_show_0003_signal = Signal(object)
|
|
|
- to_show_0004_signal = Signal(object)
|
|
|
- to_show_0005_signal = Signal(object)
|
|
|
- to_show_0006_signal = Signal(object)
|
|
|
- to_show_0007_signal = Signal(object)
|
|
|
- to_show_0008_signal = Signal(object)
|
|
|
- to_show_0009_signal = Signal(object)
|
|
|
- to_show_000A_signal = Signal(object)
|
|
|
- to_show_000B_signal = Signal(object)
|
|
|
- to_show_000C_signal = Signal(object)
|
|
|
- to_show_000D_signal = Signal(object)
|
|
|
- to_show_000E_signal = Signal(object)
|
|
|
- to_show_000F_signal = Signal(object)
|
|
|
- to_show_0010_signal = Signal(object)
|
|
|
- to_show_0011_signal = Signal(object)
|
|
|
- to_show_0012_signal = Signal(object)
|
|
|
- to_show_0013_signal = Signal(object)
|
|
|
- to_show_0014_signal = Signal(object)
|
|
|
- to_show_0015_signal = Signal(object)
|
|
|
- to_show_0016_signal = Signal(object)
|
|
|
- to_show_0017_signal = Signal(object)
|
|
|
- to_show_0018_signal = Signal(object)
|
|
|
- to_show_0019_signal = Signal(object)
|
|
|
- to_show_001A_signal = Signal(object)
|
|
|
- to_show_001B_signal = Signal(object)
|
|
|
- to_show_001C_signal = Signal(object)
|
|
|
- to_show_001D_signal = Signal(object)
|
|
|
- to_show_001E_signal = Signal(object)
|
|
|
- to_show_001F_signal = Signal(object)
|
|
|
- to_show_0020_signal = Signal(object)
|
|
|
- to_show_0021_signal = Signal(object)
|
|
|
- to_show_0022_signal = Signal(object)
|
|
|
- to_show_0023_signal = Signal(object)
|
|
|
+ to_show_0000_signal = Signal(object, int)
|
|
|
+ to_show_0001_signal = Signal(object, int)
|
|
|
+ to_show_0002_signal = Signal(object, int)
|
|
|
+ to_show_0003_signal = Signal(object, int)
|
|
|
+ to_show_0004_signal = Signal(object, int)
|
|
|
+ to_show_0005_signal = Signal(object, int)
|
|
|
+ to_show_0006_signal = Signal(object, int)
|
|
|
+ to_show_0007_signal = Signal(object, int)
|
|
|
+ to_show_0008_signal = Signal(object, int)
|
|
|
+ to_show_0009_signal = Signal(object, int)
|
|
|
+ to_show_000A_signal = Signal(object, int)
|
|
|
+ to_show_000B_signal = Signal(object, int)
|
|
|
+ to_show_000C_signal = Signal(object, int)
|
|
|
+ to_show_000D_signal = Signal(object, int)
|
|
|
+ to_show_000E_signal = Signal(object, int)
|
|
|
+ to_show_000F_signal = Signal(object, int)
|
|
|
+ to_show_0010_signal = Signal(object, int)
|
|
|
+ to_show_0011_signal = Signal(object, int)
|
|
|
+ to_show_0012_signal = Signal(object, int)
|
|
|
+ to_show_0013_signal = Signal(object, int)
|
|
|
+ to_show_0014_signal = Signal(object, int)
|
|
|
+ to_show_0015_signal = Signal(object, int)
|
|
|
+ to_show_0016_signal = Signal(object, int)
|
|
|
+ to_show_0017_signal = Signal(object, int)
|
|
|
+ to_show_0018_signal = Signal(object, int)
|
|
|
+ to_show_0019_signal = Signal(object, int)
|
|
|
+ to_show_001A_signal = Signal(object, int)
|
|
|
+ to_show_001B_signal = Signal(object, int)
|
|
|
+ to_show_001C_signal = Signal(object, int)
|
|
|
+ to_show_001D_signal = Signal(object, int)
|
|
|
+ to_show_001E_signal = Signal(object, int)
|
|
|
+ to_show_001F_signal = Signal(object, int)
|
|
|
+ to_show_0020_signal = Signal(object, int)
|
|
|
+ to_show_0021_signal = Signal(object, int)
|
|
|
+ to_show_0022_signal = Signal(object, int)
|
|
|
+ to_show_0023_signal = Signal(object, int)
|
|
|
|
|
|
def __init__(self):
|
|
|
super(BmsReceived, self).__init__()
|
|
@@ -159,113 +159,113 @@ class BmsReceived(QObject):
|
|
|
if result[1] & 0xFFFF == 1:
|
|
|
self.to_show_masterid_signal.emit((result[1] >> 16) & 0xFF)
|
|
|
# 0001
|
|
|
- if result[1] == 0x18000000 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0000_signal.emit(result[2])
|
|
|
+ if (result[1] ^ 0x18000000) & 0xFFFF == 0:
|
|
|
+ self.to_show_0000_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0001
|
|
|
- if result[1] == 0x18000001 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0001_signal.emit(result[2])
|
|
|
+ if (result[1] ^ 0x18000001) & 0xFFFF == 0:
|
|
|
+ self.to_show_0001_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0002
|
|
|
- elif result[1] == 0x18000002 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0002_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000002) & 0xFFFF == 0:
|
|
|
+ self.to_show_0002_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0003
|
|
|
- elif result[1] == 0x18000003 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0003_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000003) & 0xFFFF == 0:
|
|
|
+ self.to_show_0003_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0004
|
|
|
- elif result[1] == 0x18000004 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0004_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000004) & 0xFFFF == 0:
|
|
|
+ self.to_show_0004_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0005
|
|
|
- elif result[1] == 0x18000005 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0005_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000005) & 0xFFFF == 0:
|
|
|
+ self.to_show_0005_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0006
|
|
|
- elif result[1] == 0x18000006 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0006_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000006) & 0xFFFF == 0:
|
|
|
+ self.to_show_0006_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0007
|
|
|
- elif result[1] == 0x18000007 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0007_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000007) & 0xFFFF == 0:
|
|
|
+ self.to_show_0007_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0008
|
|
|
- elif result[1] == 0x18000008 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0008_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000008) & 0xFFFF == 0:
|
|
|
+ self.to_show_0008_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0009
|
|
|
- elif result[1] == 0x18000009 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0009_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000009) & 0xFFFF == 0:
|
|
|
+ self.to_show_0009_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 000A
|
|
|
- elif result[1] == 0x1800000A | (SD.BCU_ID << 16):
|
|
|
- self.to_show_000A_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x1800000A) & 0xFFFF == 0:
|
|
|
+ self.to_show_000A_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 000B
|
|
|
- elif result[1] == 0x1800000B | (SD.BCU_ID << 16):
|
|
|
- self.to_show_000B_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x1800000B) & 0xFFFF == 0:
|
|
|
+ self.to_show_000B_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 000C
|
|
|
- elif result[1] == 0x1800000C | (SD.BCU_ID << 16):
|
|
|
- self.to_show_000C_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x1800000C) & 0xFFFF == 0:
|
|
|
+ self.to_show_000C_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 000D
|
|
|
- elif result[1] == 0x1800000D | (SD.BCU_ID << 16):
|
|
|
- self.to_show_000D_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x1800000D) & 0xFFFF == 0:
|
|
|
+ self.to_show_000D_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 000E
|
|
|
- elif result[1] == 0x1800000E | (SD.BCU_ID << 16):
|
|
|
- self.to_show_000E_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x1800000E) & 0xFFFF == 0:
|
|
|
+ self.to_show_000E_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 000F
|
|
|
- elif result[1] == 0x1800000F | (SD.BCU_ID << 16):
|
|
|
- self.to_show_000F_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x1800000F) & 0xFFFF == 0:
|
|
|
+ self.to_show_000F_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0010
|
|
|
- elif result[1] == 0x18000010 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0010_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000010) & 0xFFFF == 0:
|
|
|
+ self.to_show_0010_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0011
|
|
|
- elif result[1] == 0x18000011 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0011_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000011) & 0xFFFF == 0:
|
|
|
+ self.to_show_0011_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0012
|
|
|
- elif result[1] == 0x18000012 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0012_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000012) & 0xFFFF == 0:
|
|
|
+ self.to_show_0012_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0013
|
|
|
- elif result[1] == 0x18000013 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0013_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000013) & 0xFFFF == 0:
|
|
|
+ self.to_show_0013_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0014
|
|
|
- elif result[1] == 0x18000014 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0014_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000014) & 0xFFFF == 0:
|
|
|
+ self.to_show_0014_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0015
|
|
|
- elif result[1] == 0x18000015 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0015_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000015) & 0xFFFF == 0:
|
|
|
+ self.to_show_0015_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0016
|
|
|
- elif result[1] == 0x18000016 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0016_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000016) & 0xFFFF == 0:
|
|
|
+ self.to_show_0016_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0017
|
|
|
- elif result[1] == 0x18000017 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0017_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000017) & 0xFFFF == 0:
|
|
|
+ self.to_show_0017_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0018
|
|
|
- elif result[1] == 0x18000018 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0018_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000018) & 0xFFFF == 0:
|
|
|
+ self.to_show_0018_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0019
|
|
|
- elif result[1] == 0x18000019 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0019_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000019) & 0xFFFF == 0:
|
|
|
+ self.to_show_0019_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 001A
|
|
|
- elif result[1] == 0x1800001A | (SD.BCU_ID << 16):
|
|
|
- self.to_show_001A_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x1800001A) & 0xFFFF == 0:
|
|
|
+ self.to_show_001A_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 001B
|
|
|
- elif result[1] == 0x1800001B | (SD.BCU_ID << 16):
|
|
|
- self.to_show_001B_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x1800001B) & 0xFFFF == 0:
|
|
|
+ self.to_show_001B_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 001C
|
|
|
- elif result[1] == 0x1800001C | (SD.BCU_ID << 16):
|
|
|
- self.to_show_001C_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x1800001C) & 0xFFFF == 0:
|
|
|
+ self.to_show_001C_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 001D
|
|
|
- elif result[1] == 0x1800001D | (SD.BCU_ID << 16):
|
|
|
- self.to_show_001D_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x1800001D) & 0xFFFF == 0:
|
|
|
+ self.to_show_001D_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 001E
|
|
|
- elif result[1] == 0x1800001E | (SD.BCU_ID << 16):
|
|
|
- self.to_show_001E_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x1800001E) & 0xFFFF == 0:
|
|
|
+ self.to_show_001E_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 001F
|
|
|
- elif result[1] == 0x1800001F | (SD.BCU_ID << 16):
|
|
|
- self.to_show_001F_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x1800001F) & 0xFFFF == 0:
|
|
|
+ self.to_show_001F_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0020
|
|
|
- elif result[1] == 0x18000020 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0020_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000020) & 0xFFFF == 0:
|
|
|
+ self.to_show_0020_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0021
|
|
|
- elif result[1] == 0x18000021 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0021_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000021) & 0xFFFF == 0:
|
|
|
+ self.to_show_0021_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0022
|
|
|
- elif result[1] == 0x18000022 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0022_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000022) & 0xFFFF == 0:
|
|
|
+ self.to_show_0022_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
# 0023
|
|
|
- elif result[1] == 0x18000023 | (SD.BCU_ID << 16):
|
|
|
- self.to_show_0023_signal.emit(result[2])
|
|
|
+ elif (result[1] ^ 0x18000023) & 0xFFFF == 0:
|
|
|
+ self.to_show_0023_signal.emit(result[2], (result[1] >> 16) & 0xFF)
|
|
|
|
|
|
# # 接收数据
|
|
|
# def received(self):
|