This fixes the problem with the USBLink only works every second time. See bug 252730 for more information.
Fixes bug 252727 (patch by Greg Whittier).
Add an USBLink class, which is similar to SerialLink, but it communicates over USB instead of over a serial port. Add enough commands, so that runs and laps can be extracted from a Garmin Edge 305. Should also work with Forerunner 305, and hopefully with 205 as well.
Import them inside SerialLink and USBLink, so that you don't need to have both installed, if you're only need to use one of them.
…info. This gets rid of the need to guard debug message with an if statement. It also allows external programs to plug into the logging, and easily redirecting it to a file.
I've tried to retain all the changes, but I might have missed something. The current garmin.py works for me, but it could be broken for others, since there are no automatic tests.