Skip to content
This repository has been archived by the owner on Apr 14, 2018. It is now read-only.

Bunch of merge + logging and refactoring #34

Open
wants to merge 80 commits into
base: master
Choose a base branch
from

Conversation

benallard
Copy link
Contributor

I looked at the network and merged what I found interesting, based on the result, I tried to make the fitbit_client easier to read. This is the result.

This is more a 'look at what I did' than an actual pull-request, as I can understand that this one contains way to much to be reviewable ... Anyway, feel free to pull as you like.

Thanks for the base you wrote !

Ben Smithurst and others added 30 commits January 14, 2012 18:27
 * Add a timeout to the wait_for_beacon() function (30 seconds) after
   which the USB device is reset and the process starts again.

 * Send a 'sleep' command to the tracker after a successful sync, based
   on the way the Windows software behaves.

 * Various changes to the main client function:
   + Write a brief log file to keep an eye on the status easily
     (/var/log/fitbit.log)
   + Make stdout line buffered for running under supervise/multilog for
     example.
   + Don't sleep for 15 minutes each time - since we now send a sleep
     command for the tracker it should make sense for the client program
     to listen for beacons all the time.
with object creation/destruction.  Also had to split some logic out of
the main/run function into try_sync, to avoid storing a reference to the
FitBitClient object in the stack frame of main/run when an exception
is thrown.
and loop forever until it succeeds.
Also fix what seems like a logic error in a condition.
@sergi
Copy link

sergi commented Jan 3, 2013

This looks like a great improvement. Is there a reason it is not being pulled?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants