From 2a796b7b3bcccec99ad1ebefecda8b5661e01676 Mon Sep 17 00:00:00 2001 From: Matej Mraz Date: Thu, 14 Apr 2022 20:33:46 +0200 Subject: [PATCH] Fix get_conf_register logic in line 49 Fix get_conf_register_for_pin logic in line 49 - should be modulo instead of standard division. --- max7301/max7301.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/max7301/max7301.py b/max7301/max7301.py index b1e1d55..ca1ffbf 100644 --- a/max7301/max7301.py +++ b/max7301/max7301.py @@ -46,7 +46,7 @@ def get_pin(self, pin): return value def _get_conf_register_for_pin(self, pin): - return (pin-4)/4 + 0x09 + return (pin-4)//4 + 0x09 def _get_value_register_for_pin(self, pin): return 0x20 + pin