File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -90,10 +90,10 @@ class ControlParameters(TlvModel):
90
90
cp = ModelField (0x68 , ControlParametersValue )
91
91
92
92
93
- class ControlResponse (ControlParametersValue ):
93
+ class ControlResponse (TlvModel ):
94
94
status_code = UintField (0x66 )
95
95
status_text = BytesField (0x67 , is_string = True )
96
- body = IncludeBase ( ControlParametersValue )
96
+ body = ModelField ( 0x68 , ControlParametersValue )
97
97
98
98
99
99
class FaceEventNotificationValue (TlvModel ):
@@ -285,8 +285,11 @@ def parse_response(buf):
285
285
buf = parse_and_check_tl (memoryview (buf ), 0x65 )
286
286
cr = ControlResponse .parse (buf )
287
287
ret = {}
288
- for k in ControlResponse ._encoded_fields :
289
- val = getattr (cr , k .name )
288
+ ret ['status_code' ] = cr .status_code
289
+ ret ['status_text' ] = cr .status_text
290
+ params = cr .body
291
+ for k in ControlParametersValue ._encoded_fields :
292
+ val = getattr (params , k .name )
290
293
if isinstance (val , memoryview ):
291
294
val = bytes (val )
292
295
ret [k .name ] = val
You can’t perform that action at this time.
0 commit comments