Closed bacaj1 closed 8 years ago
I modified my loop to use capture_to_file instead, and that appears to be working (through 25 iterations).
I'd still like to know what was wrong with my previous implementation if you have time to look into it
I was having trouble with the capture_start_and_wait_until_finished function, so I took the code in it and built my own which catches the NAK exception and ignores it. Is this the correct method for dealing with the NAK when calling this function before capture is complete?
Ignoring is fine so long as you keep waiting. NAK in this context is "not done yet", so you need to keep looping until you get an ACK.
On Thu, Nov 12, 2015 at 8:46 AM bacaj1 notifications@github.com wrote:
I modified my loop to use capture_to_file instead, and that appears to be working (through 25 iterations).
I'd still like to know what was wrong with my previous implementation if you have time to look into it
— Reply to this email directly or view it on GitHub https://github.com/ppannuto/python-saleae/issues/9#issuecomment-156106385 .
I am attempting to write a test utility which will capture and save a new waveform every 20 seconds. After the first 2-3 successful iterations in the loop, the SaveDataToFile routine is raising CommandNAKedError which to my understanding of the docs means that the capture isn't complete when called or there is an issue with the filepath. As the first few files saved successfully, I doubt that the filepath is the issue, though watching the GUI the capture is definitely finished when I call save_to_file
I have attempted to wrap your library in a class of my own to allow for easy reuse.
I was having trouble with the capture_start_and_wait_until_finished function, so I took the code in it and built my own which catches the NAK exception and ignores it. Is this the correct method for dealing with the NAK when calling this function before capture is complete?
I'm using Python 3.5 / Logic 1.2.5
Here is the loop I am currently attempting to run and my class
Not sure if it will help but I also made a log as requested in analog-io's thread. logfile.txt