Closed harvardbiorobotics closed 11 years ago
It looks like I didn't test on hardware with multiple empty cells up front; can you put "print data" on a new line after "data = self.getDataRaw()" in the definition of getData?
I was able to reproduce the bug, working on a fix. For now, just call startSampling() before calling getData().
Should be fixed at 4e2ce89.
pulled the code, updated the firmware ... but same result:
biorobotics@biorobotics-OptiPlex-990:~/TakkTile-usb$ python TakkTile.py 1000
[30, 31, 32]
235523833303FFFF60FF1100E000
Traceback (most recent call last):
File "TakkTile.py", line 150, in
I included a print data ...
data = self.getDataRaw()
print data
and it returns ... an empty array ... {}
checked out earlier version of the code (5d0ff0b1db777074db653c2c37acf6bb24e54248) And the TakkTile.py is running perfectly ...
Please try with eb65920. Thanks!
Same problem .. three sensors are connected ....
biorobotics@biorobotics-OptiPlex-990:~/TakkTile-usb$ python TakkTile.py 100
[30, 31, 32]
235523833303FFFF60FF1100E000
Traceback (most recent call last):
File "TakkTile.py", line 143, in
Just tried with an TakkStrip where address starts from 0 ... and it works fine
biorobotics@biorobotics-OptiPlex-990:~/TakkTile-usb$ python TakkTile.py 100 [0, 1, 2, 3, 4] 235523833303FFFF60FF1100E000 {0: 98.9344, 1: 98.2196, 2: 92.9452, 3: 101.1616, 4: 102.8368} {0: 98.8991, 1: 98.3388, 2: 93.1176, 3: 101.1616, 4: 102.9557} {0: 98.8991, 1: 98.0656, 2: 92.8796, 3: 101.1978, 4: 102.9927}
when I changed the address of the strip, the values read are wrong:
biorobotics@biorobotics-OptiPlex-990:~/TakkTile-usb$ python TakkTile.py 100 [5, 6, 7, 8, 9] 235523833303FFFF60FF1100E000 {8: 50.0, 9: 50.0, 5: 50.0, 6: 50.0, 7: 50.0} {8: 50.0, 9: 50.0, 5: 50.0, 6: 50.0, 7: 50.0} {8: 50.0, 9: 50.0, 5: 50.0, 6: 50.0, 7: 50.0} {8: 50.0, 9: 50.0, 5: 50.0, 6: 50.0, 7: 50.0}
Did you unplug / replug the array after changing the address of the strip?
And can you confirm that you updated the firmware from eb65920?
I did unplug and replug the array and I can confirm that the firmware is from eb65920
Confirming this still an open issue. Running d86aa5edd on the interface. This appears to be a problem when sensor0 is not in isAlive() -- currently have sensors 30:39
Thanks for the update - could you upload a photograph of your hardware testbed? I'll look to see what logic in TakkTile.py depends upon the existence of a sensor 0, and depopulate one of my test boards to more accurately duplicate the bug.
I just rewrote some of the internal datastructures associated with the exchange of the calibration coefficients; they were being erroneously set to zero if taxel 0 wasn't alive; please try with e3de89756e62a001d137baaa6f340d7381141610. This solves the problem that presented itself after removing sensor 0 from my array.
Thanks!
Can you confirm that e3de897 resolves taxel-0 issues on your array?
Thanks!
This appears to resolve the issue. Thanks!
The xmega was updated with the latest firmware. Running the TakkTile.py results with KeyError 30. Any ideas ?
biorobotics@biorobotics-OptiPlex-990:~/TakkTile-usb$ python TakkTile.py 1000
[30, 31, 32] 235523833303FFFF60FF1100E000 Traceback (most recent call last): File "TakkTile.py", line 149, in
print(tact.getData())
File "TakkTile.py", line 115, in getData
Pcomp[cell] = cc["a0"] + (cc["b1"] + cc["c11"]_Padc(cell) + cc["c12"]_Tadc(cell))_Padc(cell) + (cc["b2"] + cc["c22"]_Tadc(cell))*Tadc(cell)
File "TakkTile.py", line 104, in
Padc = lambda cell: data[cell][0]
KeyError: 30