Commit 2b9a2b1a authored by Georges Khaznadar's avatar Georges Khaznadar

modified the response to better comply with the data structure

parent bf1852e4
Index: expeyes/eyes17/eyes17/Peripherals.py
===================================================================
--- expeyes.orig/eyes17/eyes17/Peripherals.py
+++ expeyes/eyes17/eyes17/Peripherals.py
@@ -1,7 +1,7 @@
from __future__ import print_function
from . import commands_proto as CP
import numpy as np
-import time,inspect
+import time,inspect,struct
class I2C():
@@ -309,7 +309,7 @@ class I2C():
data=self.H.fd.read(bytes_to_read)
self.H.__get_ack__()
try:
- return [ord(a) for a in data]
+ return list(struct.unpack('<%dB'%len(data), data))#[ord(a) for a in data]
except:
print ('Transaction failed')
return False
autotool-clib.patch
Peripherals.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment