mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
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:
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user