Fix packing sub_cmd.

sub_cmd is an unsigned char, since VENDOR_PROTOTYPE is 0xff. If not, it cannot be encoded.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2023-11-02 22:22:34 +01:00
parent 032dd8b853
commit 4abb4a577f
No known key found for this signature in database
GPG Key ID: C0095B7870A4CCD3
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ class Config:
msg = (
b"\xff" * 32
+ b"\x0d"
+ struct.pack("<b", sub_cmd)
+ struct.pack("<B", sub_cmd)
+ (cbor.encode(params) if params else b"")
)
pin_uv_protocol = self.pin_uv.protocol.VERSION