Skip to content

Commit fb27771

Browse files
committed
update charger_info
1 parent 80f3493 commit fb27771

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

bms-g3.ksy.yml

+19-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
meta:
2-
id: zlog-bms
2+
id: zlog_bms
33
title: A parser for Zero motorcycle Gen 3 BMS binary log files
44
endian: le
55
#bit-endian: le
66

77
seq:
8-
- id: Partial #```````````Partial log till next 0xb2 entry
8+
- id: partial #```````````Partial log till next 0xb2 entry
99
terminator: 0xB2
1010
consume: false # So next stream can read/start from 0xB2
1111
doc: "Find first valid log entry"
@@ -16,7 +16,6 @@ seq:
1616
repeat-until: _io.eof
1717

1818
types:
19-
# from ttyConsol: Entry / Time of Log / UTC|Code / Event description; and data
2019
log_entries:
2120
seq:
2221
- id: header_begin
@@ -26,12 +25,15 @@ types:
2625
doc: "Data is sometimes less then <length> bytes. Calculated different then MBB"
2726
- id: log_type
2827
type: u1
29-
doc: "0xFD 0x4D"
30-
- id: timestamp
31-
type: u4
32-
- id: unknown_header_section
28+
doc: "0xFD 0x4B 0x4D"
29+
# when length 0x6B: 0xFE or <variable> 0xFE is inserted before timestamp. variable increments by three
30+
# 0x40->0x43. Sometimes nothing inserted though (smh)
31+
# - id: timestamp
32+
# type: u4
33+
- id: header
3334
terminator: 0xF9
34-
#size: 4 #--often four but not always(or corrupted entry?) <--MBB... (BMS also?)
35+
doc: "Process <data-somtimes>,timestamp,<data:null>,sequence-number at program SW level for now"
36+
#size: 4
3537
# - id: count
3638
# type: u1
3739
# doc: 'seems to increment for every 0xB2 record'
@@ -41,10 +43,17 @@ types:
4143
type:
4244
switch-on: log_type
4345
cases:
44-
0x4d: log_type_4_d
45-
0xfd: capacity_estimate
46+
0x4B: log_type_4_b
47+
0x4D: log_type_4_d
48+
0xFD: capacity_estimate
4649
_: log_type_unknown
4750

51+
log_type_4_b:
52+
seq:
53+
- id: data
54+
eos-error: false
55+
terminator: 0xB2
56+
consume: false
4857
log_type_4_d:
4958
seq:
5059
- id: data

zlog.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ types:
111111
# pos: unknown_header_section.eos
112112

113113
# CHARGERS| EN | DC V A | AC V A HZ |CMD A| Ver | SN | ID | STATUS
114-
# 3kW , 0, 0.0, 0.0, 0, 0.0, 0, 0, 201, 2052093, 0x010, 0x0020
114+
# 3kW , 0, 0.0, 0.0, 0, 0.0, 0, 0, 201, 0000000, 0x010, 0x0020
115115
charger_info:
116116
seq:
117117
- id: name

0 commit comments

Comments
 (0)