WKO+ iBike fixup was wrong

reverted after testing against more files. There is something
decidedly odd about WKO+ files from iBike computers. The scheme
used to mark pauses in recording is different, but cannot work
out why.
This commit is contained in:
Mark Liversedge
2011-10-11 10:29:39 +01:00
parent d7faa76e2c
commit 107ba0ff99

View File

@@ -488,7 +488,6 @@ WkoParser::parseRawData(WKO_UCHAR *fb)
// Now output this sample if it is not a null record
if (!isnull) {
static int time=0;
// !! needs to be modified to support the new alt patch
results->appendPoint((double)rtime/1000, cad, hr, km,
kph, nm, watts, alt, lon, lat, wind, 0);
@@ -507,7 +506,8 @@ static int time=0;
// pause record different in version 1
if (version == 1) pausesize=31;
else pausesize=39;
else if (WKO_device == 0x14) pausesize = 39;
else pausesize=42;
/* set increment value -> if followed by a null record
it is to show a pause in recording -- velotrons seem to cause
@@ -516,15 +516,13 @@ static int time=0;
pausetime = get_bits(thelot, bit, 32);
if (version != 1) inc = pausetime;
#if 0
else {
//XXX Version 1 pause records debug!
fprintf(stderr, "v1 pausetime: ");
for (int i=0; i<pausesize; i++) {
fprintf(stderr, "pausetime: ");
for (int i=0; i<pausesize+20; i++) {
int x = get_bits(thelot, bit+i, 1);
fputc(x ? '1' : '0', stderr);
}
fprintf(stderr, " %ld ", pausetime);
fputc('\n', stderr);
}
#endif
bit += pausesize;
}