diff --git a/src/FitRideFile.cpp b/src/FitRideFile.cpp index 1d5e65276..2756ebcec 100644 --- a/src/FitRideFile.cpp +++ b/src/FitRideFile.cpp @@ -298,9 +298,15 @@ struct FitFileReaderState // does not set product at this point rideFile->setDeviceType("Sigmasport ROX"); + } else if (manu == 76) { + + // Moxy + rideFile->setDeviceType("Moxy Monitor"); + } else if (manu == 260) { // Zwift! rideFile->setDeviceType("Zwift"); + } else { rideFile->setDeviceType(QString("Unknown FIT Device %1:%2").arg(manu).arg(prod)); diff --git a/src/MoxyDevice.cpp b/src/MoxyDevice.cpp index 1e5116892..81d18305d 100644 --- a/src/MoxyDevice.cpp +++ b/src/MoxyDevice.cpp @@ -46,7 +46,14 @@ static QDateTime dateTimeForRow(QString line) // first row has data and time ? QStringList tokens = line.split(","); - if (tokens.count() != 6) return QDateTime(); + if (tokens.count() != 6 && tokens.count() !=7) return QDateTime(); + + // is the date in UTC Format ? + // XXX we have no way of converting from UTC + // XXX at present since we don't know what TZ + // XXX the ride was recorded in ... + bool UTCdate = tokens.count() == 7; + Q_UNUSED(UTCdate); // parse date and time QStringList mmdd = tokens[0].split("-"); @@ -485,6 +492,7 @@ MoxyDevice::readUntilPrompt(CommPortPtr dev, char *buf, int len, QString &err) // we got our prompt if (*(buf+sofar-1) == '>') break; } + return sofar; }