openambitproject / openambit

openambit
280 stars 82 forks source link

Uploading new logs takes very long #88

Closed benedetto closed 9 years ago

benedetto commented 9 years ago

For some time now (a month or so) if I sync new moves from my watch, even after about 10 minutes after the sync from the watch was finished successfully, the logs are still not on movescount. If I exit openambit and start it again, it takes another minute or two until the logs get uploaded to the movescount server and the "see move on movescount" link appears.

I'm not sure if this was introduced through some of the recent code changes or if the number of moves currently stored on my computer (there are about 150 already synced moves in the moves list) somehow prevents that the newest moves are synced (I could imagine that openambit cycles chronologically through the stored moves to see which ones have to be synced).

Also, there are no error messages or warnings on the console.

paddy-hack commented 9 years ago

Sorry about that. I should have paid closer attention to the exact types before using memcpy().

Using uint8_t in src/openambit/deviceinfo.h should have fixed the problem as well. No?

svenstorp commented 9 years ago

No worries!

Yeah, changing to uint8_t would have fixed the problem as well. I just figure, since we convert the data to an internal object, we could just as well make the "parsing" of the bytes there instead of every time we use the data.

benedetto commented 9 years ago

@paddy-hack @svenstorp For me the commit that was referenced with the closing of this issue doesn't fix the problem. I also tried to change the ints to uint8_t without success. Any ideas?