From f402a10acdd03cc332d6b65a234e996463d18983 Mon Sep 17 00:00:00 2001 From: Liz Dahlstrom Date: Sat, 28 Jan 2017 11:16:30 -0800 Subject: [PATCH] running test_myo on brand new device no longer causes error Traceback (most recent call last): File "test_myo.py", line 30, in main() File "test_myo.py", line 19, in main myo.run() File "../lib/myo.py", line 51, in run self.ble.receive_packet(timeout) File "../lib/ble.py", line 23, in receive_packet self.notify_event(packet) File "../lib/ble.py", line 49, in notify_event listener.handle_data(p) File "../lib/device_listener.py", line 12, in handle_data data_type, value, address, _, _, _ = unpack('6B', payload) File "../lib/utilities.py", line 7, in unpack return struct.unpack('<' + fmt, *args) struct.error: unpack requires a string argument of length 6 Upgrading my firmware fixed it. --- lib/myo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/myo.py b/lib/myo.py index 093aed0..57ed188 100644 --- a/lib/myo.py +++ b/lib/myo.py @@ -58,7 +58,7 @@ def valid_firmware_version(self): print('Firmware version: %d.%d.%d.%d' % (major, minor, patch, build)) - return major > 0 + return major > 0 && minor > 4 def add_listener(self, listener): if self.ble is not None: