X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/blobdiff_plain/a212d2a2ebc0a709e1813d4c3633a17cb444d777..0c3fbc1b0a51c47cc78a8595ef353773e1824f55:/src/adafruit_blinka/microcontroller/nova/spi.py diff --git a/src/adafruit_blinka/microcontroller/nova/spi.py b/src/adafruit_blinka/microcontroller/nova/spi.py index 72f084f..7f46def 100644 --- a/src/adafruit_blinka/microcontroller/nova/spi.py +++ b/src/adafruit_blinka/microcontroller/nova/spi.py @@ -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