ole00 / afterburner

GAL chip programmer for Arduino
166 stars 46 forks source link

PC program does not recognize output sometimes #41

Closed rhgndf closed 1 year ago

rhgndf commented 1 year ago

Errors with:

Afterburner v.0.5.3 
opening serial: /dev/ttyACM0
Output from programmer not recognised: 
AFTerburner v.0.5.3
 varVpp 
type 'h' for help
>
result=-1

Possibly due to the function openSerial in afterburner.c: buf[total - 3] == '>' where there is variability on the newlines read at the end, so might need to check for '>' in the last few bytes as compared to only checking one position?

ole00 commented 1 year ago

Thanks for the report and the insight. So far I can't reproduce it, but I admit it can happen if the '>' character is received in a separate 'batch' of characters read from the serial line. In such case the function checkPromptExists() returns earlier than it should and causes the issue.

ole00 commented 1 year ago

This might be improved (fixed?) by this commit b498bc7

rhgndf commented 1 year ago

Seems to be more reliable now