From ef91f797a83909fd5a6fda8258a9a67c4f0371ee Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 22 Mar 2012 23:52:25 +0000 Subject: [PATCH] Upping the ls_get_status() timeout for digital sensors; should fix Issue 35. --- nxt/sensor/digital.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nxt/sensor/digital.py b/nxt/sensor/digital.py index a2dafba..8948456 100644 --- a/nxt/sensor/digital.py +++ b/nxt/sensor/digital.py @@ -1,7 +1,7 @@ # nxt.sensor module -- Classes to read LEGO Mindstorms NXT sensors # Copyright (C) 2006,2007 Douglas P Lau # Copyright (C) 2009 Marcus Wanner, Paulo Vieira, rhn -# Copyright (C) 2010,2011 Marcus Wanner +# Copyright (C) 2010,2011,2012 Marcus Wanner # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -81,7 +81,7 @@ def __init__(self, brick, port, check_compatible=True): suppressed by passing "check_compatible=False" when creating the sensor object.""") def _ls_get_status(self, n_bytes): - for n in range(10): + for n in range(30): #https://code.google.com/p/nxt-python/issues/detail?id=35 try: b = self.brick.ls_get_status(self.port) if b >= n_bytes: