Skip to content

Commit 409bcc2

Browse files
committed
fix gr25 acu statsus one test
1 parent 8385683 commit 409bcc2

2 files changed

Lines changed: 57 additions & 43 deletions

File tree

gr25/message.go

Lines changed: 57 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ var ACUStatusOneTest1 = MessageTest{
109109
ExpectedValues: map[string]interface{}{
110110
"accumulator_voltage": 0,
111111
"ts_voltage": 0,
112-
"accumulator_current": -327.68,
112+
"accumulator_current": 0,
113113
"accumulator_soc": 0,
114114
"glv_soc": 0,
115115
},
@@ -122,7 +122,7 @@ var ACUStatusOneTest2 = MessageTest{
122122
ExpectedValues: map[string]interface{}{
123123
"accumulator_voltage": 19.24,
124124
"ts_voltage": 48.23,
125-
"accumulator_current": -72.33,
125+
"accumulator_current": 255.35,
126126
"accumulator_soc": 50.196,
127127
"glv_soc": 95.294,
128128
},
@@ -1467,45 +1467,61 @@ var SAMPushrodForceTest2 = MessageTest{
14671467
var TCMResourceTest1 = MessageTest{
14681468
ID: 0x02A,
14691469
Name: "TCM Resource Utilization Test 1",
1470-
Data: []byte{0x35, 0x1b, 0x58, 0x03, 0xB8, 0x4b, 0x59},
1471-
ExpectedValues: map[string]interface{}{
1472-
"cpu_util": 53,
1473-
"gpu_util": 27,
1474-
"ram_util": 88,
1475-
"disk_util": 3,
1476-
"power_util": 18.4,
1477-
"cpu_temp": 75,
1478-
"gpu_temp": 89,
1479-
},
1480-
}
1481-
1482-
var TCMResourceTest2 = MessageTest{
1483-
ID: 0x02A,
1484-
Name: "TCM Resource Utilization Test 2",
1485-
Data: []byte{0x00, 0x00, 0x01, 0x02, 0x03, 0x00, 0x00},
1486-
ExpectedValues: map[string]interface{}{
1487-
"cpu_util": 0,
1488-
"gpu_util": 0,
1489-
"ram_util": 1,
1490-
"disk_util": 2,
1491-
"power_util": 0.3,
1492-
"cpu_temp": 0,
1493-
"gpu_temp": 0,
1494-
},
1495-
}
1496-
1497-
var TCMResourceTest3 = MessageTest{
1498-
ID: 0x02A,
1499-
Name: "TCM Resource Utilization Test 3",
1500-
Data: []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
1501-
ExpectedValues: map[string]interface{}{
1502-
"cpu_util": 255,
1503-
"gpu_util": 255,
1504-
"ram_util": 255,
1505-
"disk_util": 255,
1506-
"power_util": 25.5,
1507-
"cpu_temp": 255,
1508-
"gpu_temp": 255,
1470+
Data: []byte{
1471+
0x0B, 0xB8, // CPU0 Freq (3000)
1472+
0x32, // CPU0 Util (50)
1473+
0x0B, 0xB8, // CPU1 Freq (3000)
1474+
0x30, // CPU1 Util (48)
1475+
0x0B, 0xB8, // CPU2 Freq (3000)
1476+
0x2D, // CPU2 Util (45)
1477+
0x0B, 0xB8, // CPU3 Freq (3000)
1478+
0x28, // CPU3 Util (40)
1479+
0x0B, 0xB8, // CPU4 Freq (3000)
1480+
0x25, // CPU4 Util (37)
1481+
0x0B, 0xB8, // CPU5 Freq (3000)
1482+
0x20, // CPU5 Util (32)
1483+
0x2A, // CPU Total Util (42)
1484+
0x20, 0x00, // RAM Total (8192)
1485+
0x10, 0x00, // RAM Used (4096)
1486+
0x50, // RAM Util (80)
1487+
0x2B, // GPU Util (43)
1488+
0x13, 0x88, // GPU Freq (5000)
1489+
0x00, 0x10, 0x00, 0x00, // Disk Total (1048576)
1490+
0x00, 0x08, 0x00, 0x00, // Disk Used (524288)
1491+
0x40, // Disk Util (64)
1492+
0x4B, // CPU Temp (75°C)
1493+
0x59, // GPU Temp (89°C)
1494+
0x27, 0x10, // Voltage (10000 mV = 10.0 V)
1495+
0x03, 0xE8, // Current (1000 mA = 1.0 A)
1496+
0x46, 0x50, // Power (18000 mW = 18.0 W)
1497+
},
1498+
ExpectedValues: map[string]interface{}{
1499+
"cpu_0_freq": 3000,
1500+
"cpu_0_util": 50,
1501+
"cpu_1_freq": 3000,
1502+
"cpu_1_util": 48,
1503+
"cpu_2_freq": 3000,
1504+
"cpu_2_util": 45,
1505+
"cpu_3_freq": 3000,
1506+
"cpu_3_util": 40,
1507+
"cpu_4_freq": 3000,
1508+
"cpu_4_util": 37,
1509+
"cpu_5_freq": 3000,
1510+
"cpu_5_util": 32,
1511+
"cpu_total_util": 42,
1512+
"ram_total": 8192,
1513+
"ram_used": 4096,
1514+
"ram_util": 80,
1515+
"gpu_util": 43,
1516+
"gpu_freq": 5000,
1517+
"disk_total": 1048576,
1518+
"disk_used": 524288,
1519+
"disk_util": 64,
1520+
"cpu_temp": 75,
1521+
"gpu_temp": 89,
1522+
"voltage_draw": 10.0,
1523+
"current_draw": 1.0,
1524+
"power_draw": 18.0,
15091525
},
15101526
}
15111527

gr25/tcm.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import "fmt"
55
func GenerateTCMTests() []MessageTest {
66
var tests = []MessageTest{
77
TCMResourceTest1,
8-
TCMResourceTest2,
9-
TCMResourceTest3,
108
}
119

1210
for i := range tests {

0 commit comments

Comments
 (0)