andybusse/uavcamera — pull request #3 by michaelwh (2011-11-24 23:03:00+00:00)
Title: < 10 second image sending!!

- got image data sending working, it does not conform to the proper packet structure yet (no IMAGE_DATA message id at the beginning) but that should not take too long to fix

- BUT it is sending at pretty much full speed (perhaps we can squeese a few
more bytes per package out of it) Meaning download speeds of under 10
seconds for a full size test image!

- while getting it to work with the new code structure I ran into an
incredibly annoying and difficult to debug bug, basically a while loop was
testing on a variable which was being changed externally to the loop, but
for some reason this was not picked up by the while loop so it would never
exit (probably because the test condition was optimised out since the
variable was being changed in an ISR which the compiler may not know
about)
- the solution was to mark the variable as volatile

- the current system should now support cancelling sending of images halfway
through with minor modifications