Skip to content

Commit 37c4788

Browse files
committed
Fix return issue
1 parent 8e5dd0e commit 37c4788

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

sh2_analyzer.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,16 @@ class SH2Hla(HighLevelAnalyzer):
124124
'format': 'CH: {{data.channel}} SEQ: {{data.sequence}} DAT[{{data.length}}]: {{data.contents}}'
125125
},
126126
'tbase': {
127-
'format': 'delta = {{data.delta}}',
127+
'format': 'timebase delta = {{data.delta}}',
128128
},
129129
'accel': {
130-
'format': '[x,y,z] = [{{data.x}} {{data.y}} {{data.z}}]',
130+
'format': 'linaccel [x,y,z] = [{{data.x}} {{data.y}} {{data.z}}]',
131131
},
132132
'gyro': {
133-
'format': '[x,y,z] = [{{data.x}} {{data.y}} {{data.z}}]',
133+
'format': 'gyro [x,y,z] = [{{data.x}} {{data.y}} {{data.z}}]',
134134
},
135135
'rotv': {
136-
'format': '[r,p,y,a] = [{{data.roll}} {{data.pitch}} {{data.yaw}} {{data.accuracy}}]',
136+
'format': 'rotv [r,p,y,a] = [{{data.roll}} {{data.pitch}} {{data.yaw}} {{data.accuracy}}]',
137137
},
138138
}
139139

@@ -175,7 +175,6 @@ def parse_sh2(self, frame: AnalyzerFrame, p):
175175
if is_done:
176176
data = dict()
177177
if self.current_report.report_type == 'gyro' or self.current_report.report_type == 'accel':
178-
179178
data['x'] = self.current_report.x.getFloating()
180179
data['y'] = self.current_report.x.getFloating()
181180
data['z'] = self.current_report.x.getFloating()
@@ -185,7 +184,8 @@ def parse_sh2(self, frame: AnalyzerFrame, p):
185184
data['yaw'] = self.current_report.yaw
186185
elif self.current_report.report_type == 'tbase':
187186
data['delta'] = self.current_report.delta
188-
187+
188+
print(data)
189189
f = AnalyzerFrame(
190190
self.current_report.report_type,
191191
self.current_report.start_time,
@@ -198,7 +198,7 @@ def parse_sh2(self, frame: AnalyzerFrame, p):
198198
frames.append(f)
199199

200200

201-
return None
201+
return frames
202202

203203
def decode(self, frame: AnalyzerFrame):
204204
fp = self.shtp_parser.decode(frame)

0 commit comments

Comments
 (0)