# HG changeset patch # User drewp # Date 2002-07-12 10:00:10 # Node ID 4455a7e86643b937c9f1dc96d10caad4317f6bb9 # Parent 0b86bf6808f8765cb0c2270f571b7a767207b1a2 added a note about the funny read order diff --git a/light8/serport.i b/light8/serport.i --- a/light8/serport.i +++ b/light8/serport.i @@ -34,6 +34,10 @@ #define CHAN_TO_TUPLE_POS(chan,idx) i2c_smbus_write_byte(file, chan);\ PyTuple_SetItem(t,idx,PyInt_FromLong(i2c_smbus_read_byte(file))); + /* + these are shuffled here to match the way the pots read in. in + the returned tuple, 0=left pot..3=right pot. + */ CHAN_TO_TUPLE_POS(1,0) CHAN_TO_TUPLE_POS(2,1) CHAN_TO_TUPLE_POS(3,2)