From f8f32ad4e315efa1fb31e01b8e563aeb1997e5e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20Adolfo=20Mesa=20Rold=C3=A1n?= Date: Sat, 15 Feb 2020 09:18:17 +0100 Subject: [PATCH] less is more --- logitech/g19.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/logitech/g19.py b/logitech/g19.py index d8d7544..b9679cc 100644 --- a/logitech/g19.py +++ b/logitech/g19.py @@ -246,16 +246,9 @@ class G19(object): (data[239 * 2], data[239 * 2 + 1]) the lower left one. ''' - if len(data) != (320 * 240 * 2): - raise ValueError("illegal frame size: " + str(len(data)) - + " should be 320x240x2=" + str(320 * 240 * 2)) - - frame = list(self.__frame_content) - frame += data - self.__usbDeviceMutex.acquire() try: - self.__usbDevice.handleIf0.bulkWrite(2, frame, self.__write_timeout) + self.__usbDevice.handleIf0.bulkWrite(2, list(self.__frame_content) + data, self.__write_timeout) finally: self.__usbDeviceMutex.release()