]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Revert src/adafruit_blinka/microcontroller/nova/spi.py
authorHajime Fujimoto <hajime2008x@yahoo.co.jp>
Wed, 5 Jun 2024 11:16:36 +0000 (20:16 +0900)
committerHajime Fujimoto <hajime2008x@yahoo.co.jp>
Wed, 5 Jun 2024 11:16:36 +0000 (20:16 +0900)
src/adafruit_blinka/microcontroller/nova/spi.py

index 72f084fd3b4f8e2600bbc990619b66f0c4aa4892..7f46def09c4691aae5c3361e3164de2eb6dd9ace 100644 (file)
@@ -180,9 +180,9 @@ class SPI:
                     # loop over half of resp len as we're reading 2 chars at a time to form a byte
                     loops = int(len(resp) / 2)
                     for j in range(loops):
-                        buffer_in[(i * self.WHR_PAYLOAD_MAX_LENGTH) + in_start + j] = (
-                            int(resp[j * 2] + resp[j * 2 + 1], 16)
-                        )
+                        buffer_in[
+                            (i * self.WHR_PAYLOAD_MAX_LENGTH) + in_start + j
+                        ] = int(resp[j * 2] + resp[j * 2 + 1], 16)
                 else:
                     raise RuntimeError(
                         "Received error response from Binho Nova, result = " + result
@@ -198,9 +198,9 @@ class SPI:
                     # loop over half of resp len as we're reading 2 chars at a time to form a byte
                     loops = int(len(resp) / 2)
                     for j in range(loops):
-                        buffer_in[(i * self.WHR_PAYLOAD_MAX_LENGTH) + in_start + j] = (
-                            int(resp[j * 2] + resp[j * 2 + 1], 16)
-                        )
+                        buffer_in[
+                            (i * self.WHR_PAYLOAD_MAX_LENGTH) + in_start + j
+                        ] = int(resp[j * 2] + resp[j * 2 + 1], 16)
                 else:
                     raise RuntimeError(
                         "Received error response from Binho Nova, result = " + result