Support Moxy Firmware v1.0

.. fit file manu:76 identified as Moxy
.. support 7 field CSV, ignore session number

NOTE: support for UTC dates is not present since we
      have no way of checking what TZ the ride was
      recorded in !
This commit is contained in:
Mark Liversedge
2015-07-03 14:57:09 +01:00
parent e28be2ff78
commit b6f715bbde
2 changed files with 15 additions and 1 deletions

View File

@@ -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));

View File

@@ -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;
}