Skip to content

Commit

Permalink
Added backup functionality to Edge305 devices
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Diesner authored and Andreas Diesner committed Dec 26, 2012
1 parent 918d621 commit 7539ace
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/edge305Device.cpp
Expand Up @@ -124,6 +124,12 @@ Thread-Status

string fitnessDataXml = readFitnessData(readTrackData, fitnessDetailId);

// Write to backup directory if needed
if ((readTrackData) && (fitnessDetailId.length()>0)) {
time_t startTime = GpsFunctions::getStartTimestampFromXml(fitnessDataXml);
backupWorkout(fitnessDataXml, "tcx", startTime);
}

lockVariables();
this->threadState = 3;
fitnessDataTcdXml = fitnessDataXml;
Expand Down Expand Up @@ -997,7 +1003,7 @@ bool Edge305Device::isDeviceAvailable() {
// So cut all unprintable characters at the end
/*static*/
string Edge305Device::filterDeviceName(string name) {
int i = 0; // new length of string
unsigned int i = 0; // new length of string
while (i<name.length()) {
if ((name[i]>=' ') && (name[i]<='~')) { // 32-126 printable ascii characters
i++;
Expand Down

0 comments on commit 7539ace

Please sign in to comment.