Logical error in example file

Bug #1477989 reported by Daniel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
usbtc08-python (Ubuntu)
New
Undecided
Unassigned

Bug Description

The example file examples/test.py contains an init loop which iterates through all 8 inputs but instead initializes input number one 8 times.

diff -u examples/test.py_orig examples/test.py
--- examples/test.py_orig 2015-07-24 15:01:19.915814373 +0200
+++ examples/test.py 2015-07-24 15:01:31.608553642 +0200
@@ -33,7 +33,7 @@
 r = usbtc08.usb_tc08_set_channel(handle, 0, 'C')

 for i in xrange(1,9):
- r &= usbtc08.usb_tc08_set_channel(handle, 1, 'J')
+ r &= usbtc08.usb_tc08_set_channel(handle, i, 'J')

 if not r:
     print >>sys.stderr, "ERROR: failed to configure channels"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.