GitHub PullRequestEvent at 2014-05-23 18:01:45
Repository: pi-tronics
Actor: stoduk
Payload: {"action":"opened","number":3,"pull_request":{"url":"https://api.github.com/repos/hamishcunningham/pi-tronics/pulls/3","id":16286657,"html_url":"https://github.com/hamishcunningham/pi-tronics/pull/3","diff_url":"https://github.com/hamishcunningham/pi-tronics/pull/3.diff","patch_url":"https://github.com/hamishcunningham/pi-tronics/pull/3.patch","issue_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/issues/3","number":3,"state":"open","title":"Fix bug in retry handling: if all retries fail then error is swallowed","user":{"login":"stoduk","id":5287714,"avatar_url":"https://avatars.githubusercontent.com/u/5287714?","gravatar_id":"ef7a2f0e34823e1ba63ac68dfc360d79","url":"https://api.github.com/users/stoduk","html_url":"https://github.com/stoduk","followers_url":"https://api.github.com/users/stoduk/followers","following_url":"https://api.github.com/users/stoduk/following{/other_user}","gists_url":"https://api.github.com/users/stoduk/gists{/gist_id}","starred_url":"https://api.github.com/users/stoduk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoduk/subscriptions","organizations_url":"https://api.github.com/users/stoduk/orgs","repos_url":"https://api.github.com/users/stoduk/repos","events_url":"https://api.github.com/users/stoduk/events{/privacy}","received_events_url":"https://api.github.com/users/stoduk/received_events","type":"User","site_admin":false},"body":"Moved to using a decorator to add the retry - should be clearer what is happening.\r\n\r\nI had to make some changes to the retry decorator, which I've pushed upstream to https://github.com/saltycrane/retry-decorator\r\n\r\nSome notes:\r\n- I tested this fully with my UT (which isn't publically committed) - logs below\r\n- I tested the changes I need to \"retry\" decorator separately, see the pull request at https://github.com/saltycrane/retry-decorator/pull/2\r\n- it requires adding a new file - I've copied what I could see for other files (basically add the file, and the symlink in debian/).  Is there any more to it than this?\r\n\r\nTesting with the UT stub that I added, this is what is causing all the DataPacket() output, which can be ignored (it comes from the test code)..  See comments inline\r\n```\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -sv\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=0, data=None, block=False) 7\r\nVerbose status:\r\n  Battery #1 active\r\n  Battery #2 active\r\n  Battery full (blue led)\r\n  NiMH battery profile\r\n  Battery #1 low/not present\r\n  Battery #2 low/not present\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\nPower on delay: 0 seconds\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # read of single value - retry then suceed\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -won 1\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='w', register=3, data=1, block=False) 0\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\nDataPacket(op='w', register=3, data=1, block=False) 0\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\nDataPacket(op='w', register=3, data=1, block=False) 0\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\nDataPacket(op='w', register=3, data=1, block=False) None\r\nDataPacket(op='r', register=3, data=None, block=False) 1\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # write of single value - retry then suceed\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 1\r\nPower on delay: 1 seconds\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # and reading back agrees it was set\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -rc\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nCombined configuration:\r\n  Maximum voltage: 0 mV\r\n  Good voltage: 0 mV\r\n  Low voltage: 0 mV\r\n  Critical voltage: 0 mV\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -wc 1 100 200 300 400\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='w', register=2, data=[1, 1, 2, 3, 4], block=True) 0\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nDataPacket(op='w', register=2, data=[1, 1, 2, 3, 4], block=True) 0\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nDataPacket(op='w', register=2, data=[1, 1, 2, 3, 4], block=True) 0\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nDataPacket(op='w', register=2, data=[1, 1, 2, 3, 4], block=True) None\r\nDataPacket(op='r', register=2, data=None, block=True) [1, 1, 2, 3, 4]\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # reading in bulk can't fail, so reads whatever it gets\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # writing can fail, if reading back doesn't match\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # retry appears to work\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -rc\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=2, data=None, block=True) [1, 1, 2, 3, 4]\r\nCombined configuration:\r\n  Source type: batteries\r\n  Maximum voltage: 100 mV\r\n  Good voltage: 200 mV\r\n  Low voltage: 300 mV\r\n  Critical voltage: 400 mV\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # and reading values back looks good\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # now make all ops retry for more than 4 times\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nmopicli. Input/output error\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # failed as it should\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -won 12\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='w', register=3, data=12, block=False) 0\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nmopicli. Input/output error\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # failed as it should\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nmopicli. Input/output error\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # read back also fails\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -rc\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nCombined configuration:\r\n  Maximum voltage: 0 mV\r\n  Good voltage: 0 mV\r\n  Low voltage: 0 mV\r\n  Critical voltage: 0 mV\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # that can't fail\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -wc 1 100 200 300 400\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='w', register=2, data=[1, 1, 2, 3, 4], block=True) 0\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nDataPacket(op='w', register=2, data=[1, 1, 2, 3, 4], block=True) 0\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nDataPacket(op='w', register=2, data=[1, 1, 2, 3, 4], block=True) 0\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nDataPacket(op='w', register=2, data=[1, 1, 2, 3, 4], block=True) 0\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nmopicli. Communication error on send\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # but writes can fail\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -rc\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nCombined configuration:\r\n  Maximum voltage: 0 mV\r\n  Good voltage: 0 mV\r\n  Low voltage: 0 mV\r\n  Critical voltage: 0 mV\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # and indeed had no effect\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # all looks good\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # check that not failing anything works ok\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\nPower on delay: 0 seconds\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -won 123\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='w', register=3, data=123, block=False) None\r\nDataPacket(op='r', register=3, data=None, block=False) 123\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 123\r\nPower on delay: 123 seconds\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # all good for single value read/write\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -rc\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nCombined configuration:\r\n  Maximum voltage: 0 mV\r\n  Good voltage: 0 mV\r\n  Low voltage: 0 mV\r\n  Critical voltage: 0 mV\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -wc 1 200 300 400 500\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='w', register=2, data=[1, 2, 3, 4, 5], block=True) None\r\nDataPacket(op='r', register=2, data=None, block=True) [1, 2, 3, 4, 5]\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli -rc\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=2, data=None, block=True) [1, 2, 3, 4, 5]\r\nCombined configuration:\r\n  Source type: batteries\r\n  Maximum voltage: 200 mV\r\n  Good voltage: 300 mV\r\n  Low voltage: 400 mV\r\n  Critical voltage: 500 mV\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # all good\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ \r\n```\r\n\r\nWith my diffs removed you can see the problem I'm fixing - if writes fail enough times the error is swallowed accidentally.\r\n```\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ patch -R <  ~/mopi/diff.retryfix.3\r\npatching file mopiapi.py\r\npatching file mopicli\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nmopicli. Communication error. Check bus? Check connection?\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nmopicli. Communication error. Check bus? Check connection?\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -won 1\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nmopicli. Communication error. Check bus? Check connection?\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nmopicli. Communication error. Check bus? Check connection?\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\nPower on delay: 0 seconds\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -won 1\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\nDataPacket(op='w', register=3, data=1, block=False) 0\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\nDataPacket(op='w', register=3, data=1, block=False) 0\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\nDataPacket(op='w', register=3, data=1, block=False) None\r\nDataPacket(op='r', register=3, data=None, block=False) 1\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 1\r\nPower on delay: 1 seconds\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -rc\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nCombined configuration:\r\n  Maximum voltage: 0 mV\r\n  Good voltage: 0 mV\r\n  Low voltage: 0 mV\r\n  Critical voltage: 0 mV\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -wc 1 100 200 300 400\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nDataPacket(op='w', register=2, data=[1, 1, 2, 3, 4], block=True) 0\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nDataPacket(op='w', register=2, data=[1, 1, 2, 3, 4], block=True) 0\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nDataPacket(op='w', register=2, data=[1, 1, 2, 3, 4], block=True) None\r\nDataPacket(op='r', register=2, data=None, block=True) [1, 1, 2, 3, 4]\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -rc\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=2, data=None, block=True) [1, 1, 2, 3, 4]\r\nCombined configuration:\r\n  Source type: batteries\r\n  Maximum voltage: 100 mV\r\n  Good voltage: 200 mV\r\n  Low voltage: 300 mV\r\n  Critical voltage: 400 mV\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nmopicli. Communication error. Check bus? Check connection?\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -won 1\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nmopicli. Communication error. Check bus? Check connection?\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nmopicli. Communication error. Check bus? Check connection?\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -rc\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nCombined configuration:\r\n  Maximum voltage: 0 mV\r\n  Good voltage: 0 mV\r\n  Low voltage: 0 mV\r\n  Critical voltage: 0 mV\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -wc 1 200 300 400 500\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nDataPacket(op='w', register=2, data=[1, 2, 3, 4, 5], block=True) 0\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nDataPacket(op='w', register=2, data=[1, 2, 3, 4, 5], block=True) 0\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nDataPacket(op='w', register=2, data=[1, 2, 3, 4, 5], block=True) 0\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -rc\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=2, data=None, block=True) [0, 0, 0, 0, 0]\r\nCombined configuration:\r\n  Maximum voltage: 0 mV\r\n  Good voltage: 0 mV\r\n  Low voltage: 0 mV\r\n  Critical voltage: 0 mV\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # array write fails but doesn't error\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # single writes do error, but because read also fails\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # so make reads work but writes fail\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\nPower on delay: 0 seconds\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\nPower on delay: 0 seconds\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -won 2\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\nDataPacket(op='w', register=3, data=2, block=False) 0\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\nDataPacket(op='w', register=3, data=2, block=False) 0\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\nDataPacket(op='w', register=3, data=2, block=False) 0\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # seemed to fail but no error\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ ./mopicli  -ron\r\nDataPacket(op='r', register=9, data=None, block=False) 773\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 65535\r\nDataPacket(op='r', register=3, data=None, block=False) 0\r\nPower on delay: 0 seconds\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $ # definitely failed\r\npi@RPi-Printer ~/mopi/pi-tronics/simbamon $\r\n```","created_at":"2014-05-23T18:01:45Z","updated_at":"2014-05-23T18:01:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/pulls/3/commits","review_comments_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/pulls/3/comments","review_comment_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/pulls/comments/{number}","comments_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/issues/3/comments","statuses_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/statuses/d09ab8ce79e4b481f53db549ef48da8e22b4ed18","head":{"label":"stoduk:master","ref":"master","sha":"d09ab8ce79e4b481f53db549ef48da8e22b4ed18","user":{"login":"stoduk","id":5287714,"avatar_url":"https://avatars.githubusercontent.com/u/5287714?","gravatar_id":"ef7a2f0e34823e1ba63ac68dfc360d79","url":"https://api.github.com/users/stoduk","html_url":"https://github.com/stoduk","followers_url":"https://api.github.com/users/stoduk/followers","following_url":"https://api.github.com/users/stoduk/following{/other_user}","gists_url":"https://api.github.com/users/stoduk/gists{/gist_id}","starred_url":"https://api.github.com/users/stoduk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoduk/subscriptions","organizations_url":"https://api.github.com/users/stoduk/orgs","repos_url":"https://api.github.com/users/stoduk/repos","events_url":"https://api.github.com/users/stoduk/events{/privacy}","received_events_url":"https://api.github.com/users/stoduk/received_events","type":"User","site_admin":false},"repo":{"id":19775870,"name":"pi-tronics","full_name":"stoduk/pi-tronics","owner":{"login":"stoduk","id":5287714,"avatar_url":"https://avatars.githubusercontent.com/u/5287714?","gravatar_id":"ef7a2f0e34823e1ba63ac68dfc360d79","url":"https://api.github.com/users/stoduk","html_url":"https://github.com/stoduk","followers_url":"https://api.github.com/users/stoduk/followers","following_url":"https://api.github.com/users/stoduk/following{/other_user}","gists_url":"https://api.github.com/users/stoduk/gists{/gist_id}","starred_url":"https://api.github.com/users/stoduk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoduk/subscriptions","organizations_url":"https://api.github.com/users/stoduk/orgs","repos_url":"https://api.github.com/users/stoduk/repos","events_url":"https://api.github.com/users/stoduk/events{/privacy}","received_events_url":"https://api.github.com/users/stoduk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stoduk/pi-tronics","description":"Source code for Raspberry Pi GATE projects.","fork":true,"url":"https://api.github.com/repos/stoduk/pi-tronics","forks_url":"https://api.github.com/repos/stoduk/pi-tronics/forks","keys_url":"https://api.github.com/repos/stoduk/pi-tronics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stoduk/pi-tronics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stoduk/pi-tronics/teams","hooks_url":"https://api.github.com/repos/stoduk/pi-tronics/hooks","issue_events_url":"https://api.github.com/repos/stoduk/pi-tronics/issues/events{/number}","events_url":"https://api.github.com/repos/stoduk/pi-tronics/events","assignees_url":"https://api.github.com/repos/stoduk/pi-tronics/assignees{/user}","branches_url":"https://api.github.com/repos/stoduk/pi-tronics/branches{/branch}","tags_url":"https://api.github.com/repos/stoduk/pi-tronics/tags","blobs_url":"https://api.github.com/repos/stoduk/pi-tronics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stoduk/pi-tronics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stoduk/pi-tronics/git/refs{/sha}","trees_url":"https://api.github.com/repos/stoduk/pi-tronics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stoduk/pi-tronics/statuses/{sha}","languages_url":"https://api.github.com/repos/stoduk/pi-tronics/languages","stargazers_url":"https://api.github.com/repos/stoduk/pi-tronics/stargazers","contributors_url":"https://api.github.com/repos/stoduk/pi-tronics/contributors","subscribers_url":"https://api.github.com/repos/stoduk/pi-tronics/subscribers","subscription_url":"https://api.github.com/repos/stoduk/pi-tronics/subscription","commits_url":"https://api.github.com/repos/stoduk/pi-tronics/commits{/sha}","git_commits_url":"https://api.github.com/repos/stoduk/pi-tronics/git/commits{/sha}","comments_url":"https://api.github.com/repos/stoduk/pi-tronics/comments{/number}","issue_comment_url":"https://api.github.com/repos/stoduk/pi-tronics/issues/comments/{number}","contents_url":"https://api.github.com/repos/stoduk/pi-tronics/contents/{+path}","compare_url":"https://api.github.com/repos/stoduk/pi-tronics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stoduk/pi-tronics/merges","archive_url":"https://api.github.com/repos/stoduk/pi-tronics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stoduk/pi-tronics/downloads","issues_url":"https://api.github.com/repos/stoduk/pi-tronics/issues{/number}","pulls_url":"https://api.github.com/repos/stoduk/pi-tronics/pulls{/number}","milestones_url":"https://api.github.com/repos/stoduk/pi-tronics/milestones{/number}","notifications_url":"https://api.github.com/repos/stoduk/pi-tronics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stoduk/pi-tronics/labels{/name}","releases_url":"https://api.github.com/repos/stoduk/pi-tronics/releases{/id}","created_at":"2014-05-14T10:45:47Z","updated_at":"2014-05-23T18:01:45Z","pushed_at":"2014-05-23T17:51:14Z","git_url":"git://github.com/stoduk/pi-tronics.git","ssh_url":"git@github.com:stoduk/pi-tronics.git","clone_url":"https://github.com/stoduk/pi-tronics.git","svn_url":"https://github.com/stoduk/pi-tronics","homepage":"http://pi.gate.ac.uk/","size":81138,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hamishcunningham:master","ref":"master","sha":"f42421e61adec6587dc3b3d9376c31950e8b55a5","user":{"login":"hamishcunningham","id":4395156,"avatar_url":"https://avatars.githubusercontent.com/u/4395156?","gravatar_id":"211cc6d212d56e71a89ada16d3431721","url":"https://api.github.com/users/hamishcunningham","html_url":"https://github.com/hamishcunningham","followers_url":"https://api.github.com/users/hamishcunningham/followers","following_url":"https://api.github.com/users/hamishcunningham/following{/other_user}","gists_url":"https://api.github.com/users/hamishcunningham/gists{/gist_id}","starred_url":"https://api.github.com/users/hamishcunningham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamishcunningham/subscriptions","organizations_url":"https://api.github.com/users/hamishcunningham/orgs","repos_url":"https://api.github.com/users/hamishcunningham/repos","events_url":"https://api.github.com/users/hamishcunningham/events{/privacy}","received_events_url":"https://api.github.com/users/hamishcunningham/received_events","type":"User","site_admin":false},"repo":{"id":10528519,"name":"pi-tronics","full_name":"hamishcunningham/pi-tronics","owner":{"login":"hamishcunningham","id":4395156,"avatar_url":"https://avatars.githubusercontent.com/u/4395156?","gravatar_id":"211cc6d212d56e71a89ada16d3431721","url":"https://api.github.com/users/hamishcunningham","html_url":"https://github.com/hamishcunningham","followers_url":"https://api.github.com/users/hamishcunningham/followers","following_url":"https://api.github.com/users/hamishcunningham/following{/other_user}","gists_url":"https://api.github.com/users/hamishcunningham/gists{/gist_id}","starred_url":"https://api.github.com/users/hamishcunningham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamishcunningham/subscriptions","organizations_url":"https://api.github.com/users/hamishcunningham/orgs","repos_url":"https://api.github.com/users/hamishcunningham/repos","events_url":"https://api.github.com/users/hamishcunningham/events{/privacy}","received_events_url":"https://api.github.com/users/hamishcunningham/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hamishcunningham/pi-tronics","description":"Source code for Raspberry Pi GATE projects.","fork":false,"url":"https://api.github.com/repos/hamishcunningham/pi-tronics","forks_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/forks","keys_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/teams","hooks_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/hooks","issue_events_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/issues/events{/number}","events_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/events","assignees_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/assignees{/user}","branches_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/branches{/branch}","tags_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/tags","blobs_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/git/refs{/sha}","trees_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/statuses/{sha}","languages_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/languages","stargazers_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/stargazers","contributors_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/contributors","subscribers_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/subscribers","subscription_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/subscription","commits_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/commits{/sha}","git_commits_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/git/commits{/sha}","comments_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/comments{/number}","issue_comment_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/issues/comments/{number}","contents_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/contents/{+path}","compare_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/merges","archive_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/downloads","issues_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/issues{/number}","pulls_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/pulls{/number}","milestones_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/milestones{/number}","notifications_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/labels{/name}","releases_url":"https://api.github.com/repos/hamishcunningham/pi-tronics/releases{/id}","created_at":"2013-06-06T14:38:10Z","updated_at":"2014-05-23T14:14:19Z","pushed_at":"2014-05-23T14:14:19Z","git_url":"git://github.com/hamishcunningham/pi-tronics.git","ssh_url":"git@github.com:hamishcunningham/pi-tronics.git","clone_url":"https://github.com/hamishcunningham/pi-tronics.git","svn_url":"https://github.com/hamishcunningham/pi-tronics","homepage":"http://pi.gate.ac.uk/","size":82867,"stargazers_count":6,"watchers_count":6,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hamishcunningham/pi-tronics/pulls/3"},"html":{"href":"https://github.com/hamishcunningham/pi-tronics/pull/3"},"issue":{"href":"https://api.github.com/repos/hamishcunningham/pi-tronics/issues/3"},"comments":{"href":"https://api.github.com/repos/hamishcunningham/pi-tronics/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/hamishcunningham/pi-tronics/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/hamishcunningham/pi-tronics/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/hamishcunningham/pi-tronics/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/hamishcunningham/pi-tronics/statuses/d09ab8ce79e4b481f53db549ef48da8e22b4ed18"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":86,"deletions":33,"changed_files":4}}