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):
9090 cp = ModelField (0x68 , ControlParametersValue )
9191
9292
93- class ControlResponse (ControlParametersValue ):
93+ class ControlResponse (TlvModel ):
9494 status_code = UintField (0x66 )
9595 status_text = BytesField (0x67 , is_string = True )
96- body = IncludeBase ( ControlParametersValue )
96+ body = ModelField ( 0x68 , ControlParametersValue )
9797
9898
9999class FaceEventNotificationValue (TlvModel ):
@@ -285,8 +285,11 @@ def parse_response(buf):
285285 buf = parse_and_check_tl (memoryview (buf ), 0x65 )
286286 cr = ControlResponse .parse (buf )
287287 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 )
290293 if isinstance (val , memoryview ):
291294 val = bytes (val )
292295 ret [k .name ] = val
You can’t perform that action at this time.
0 commit comments