From b812342a53a88acc70f735ff696b6adcb7ea4664 Mon Sep 17 00:00:00 2001 From: Marcin Jaworski Date: Mon, 12 Feb 2018 13:14:20 +0100 Subject: [PATCH] Fix Construct 2.9.28 regresion --- miio/chuangmi_ir.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miio/chuangmi_ir.py b/miio/chuangmi_ir.py index 8c3717b20..b74b6cb6b 100644 --- a/miio/chuangmi_ir.py +++ b/miio/chuangmi_ir.py @@ -141,7 +141,7 @@ def _encode(self, obj, context): Const(0xa567, Int16ul), 'edge_count' / Rebuild(Int16ul, len_(this.edge_pairs) * 2 - 1), 'times_index' / Array(16, Int32ul), - 'edge_pairs' / Array((this.edge_count + 1) / 2, BitStruct( + 'edge_pairs' / Array((this.edge_count + 1) // 2, BitStruct( 'gap' / BitsInteger(4), 'pulse' / BitsInteger(4), ))