Skip to content

Commit

Permalink
Upping the ls_get_status() timeout for digital sensors; should fix Is…
Browse files Browse the repository at this point in the history
…sue 35.
  • Loading branch information
marcuswanner committed Mar 22, 2012
1 parent 1038a43 commit ef91f79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nxt/sensor/digital.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ef91f79

Please sign in to comment.