Compare commits

...

8 Commits

Author SHA1 Message Date
Mark Liversedge
d70cf5aae4 Merge branch 'master' of github.com:/srhea/GoldenCheetah 2012-02-12 19:18:29 +00:00
Damien
6e0f769b26 Correct intialisation of altitude for TCX without altitude
modified:   src/TcxParser.cpp
2012-02-12 19:17:46 +00:00
Damien
86fa671858 Correct intialisation of altitude for TCX without altitude
modified:   src/TcxParser.cpp
2012-02-12 09:51:54 -05:00
Damien
7fcc83f62c Change speed to double in Bin parser
Fixes #636.
2012-02-11 12:32:49 +00:00
LukeNRG
fff37e524c German Translations 2012-02-05 10:47:22 -05:00
Mark Liversedge
ab03dd3637 Fix SEGV on empty/dodgy FIT files
Fixes #633.
2012-02-05 10:31:59 -05:00
Mark Liversedge
1ad2228b84 Fix PWX file intervals
Fixes #624.
2012-02-03 19:37:00 +00:00
Gareth Coco
57fbf65b23 v2.1dev - Allow ride to be added with no Average HR
Removed setPlaceholderText("") as not in Qt4.6.x
Replaced tabs with spaces

Fixes #626
2012-02-02 11:02:12 -05:00
9 changed files with 70 additions and 72 deletions

View File

@@ -425,9 +425,9 @@ struct BinFileReaderState
nm = value;
break;
case FORMAT_ID__SPEED :
value = value*3.6/100.0;
if (value < 145) // Limit for data error
kph = value;
kph = value*3.6/100.0;
if (kph > 145) // Limit for data error
kph = 0;
break;
case FORMAT_ID__CADENCE :
if (value < 255) // Limit for data error

View File

@@ -289,6 +289,8 @@ struct FitFileReaderState
time_t time = 0;
if (time_offset > 0)
time = last_time + time_offset;
else
time = last_time;
int i = 0;
time_t this_start_time = 0;
++interval;
@@ -304,11 +306,11 @@ struct FitFileReaderState
default: ; // ignore it
}
}
if (this_start_time == 0)
errors << QString("lap %1 has no start time").arg(interval);
if (this_start_time == 0 || this_start_time-start_time < 0)
errors << QString("lap %1 has invalid start time").arg(interval);
else {
rideFile->addInterval(this_start_time - start_time, time - start_time,
QString("%1").arg(interval));
if (rideFile->dataPoints().count()) // no samples means no laps..
rideFile->addInterval(this_start_time - start_time, time - start_time, QString("%1").arg(interval));
}
}

View File

@@ -56,7 +56,6 @@ ManualRideDialog::ManualRideDialog(MainWindow *mainWindow,
QIntValidator * hoursValidator = new QIntValidator(0,99,this);
//hrsentry->setInputMask("09");
hrsentry->setValidator(hoursValidator);
hrsentry->setPlaceholderText("00");
hrsentry->setMaxLength(2);
hrsentry->setAlignment(Qt::AlignCenter);
manualLengthLayout->addWidget(hrslbl);
@@ -68,7 +67,6 @@ ManualRideDialog::ManualRideDialog(MainWindow *mainWindow,
QIntValidator * mins_secsValidator = new QIntValidator(0,59,this);
//minsentry->setInputMask("00");
minsentry->setValidator(mins_secsValidator);
minsentry->setPlaceholderText("00");
minsentry->setMaxLength(2);
minsentry->setAlignment(Qt::AlignCenter);
manualLengthLayout->addWidget(minslbl);
@@ -79,7 +77,6 @@ ManualRideDialog::ManualRideDialog(MainWindow *mainWindow,
secsentry = new QLineEdit(this);
//secsentry->setInputMask("00");
secsentry->setValidator(mins_secsValidator);
secsentry->setPlaceholderText("00");
secsentry->setMaxLength(2);
secsentry->setAlignment(Qt::AlignCenter);
manualLengthLayout->addWidget(secslbl);
@@ -101,7 +98,6 @@ ManualRideDialog::ManualRideDialog(MainWindow *mainWindow,
//distanceentry->setInputMask("009.00");
distanceentry->setValidator(distanceValidator);
distanceentry->setMaxLength(6);
distanceentry->setPlaceholderText("0");
distanceentry->setAlignment(Qt::AlignCenter);
QLabel *manualDistanceHint = new QLabel(tr("(0-9999) "), this);
@@ -117,7 +113,6 @@ ManualRideDialog::ManualRideDialog(MainWindow *mainWindow,
HRentry = new QLineEdit(this);
//HRentry->setInputMask("099");
HRentry->setValidator(hrValidator);
HRentry->setPlaceholderText("0");
HRentry->setAlignment(Qt::AlignCenter);
QLabel *manualHRHint = new QLabel(tr("(30-199) "), this);
@@ -154,7 +149,6 @@ ManualRideDialog::ManualRideDialog(MainWindow *mainWindow,
BSentry = new QLineEdit(this);
BSentry->setValidator(bsValidator);
BSentry->setMaxLength(6);
BSentry->setPlaceholderText("0");
BSentry->setAlignment(Qt::AlignCenter);
BSentry->clear();
@@ -169,7 +163,6 @@ ManualRideDialog::ManualRideDialog(MainWindow *mainWindow,
DPentry = new QLineEdit(this);
DPentry->setValidator(dpValidator);
DPentry->setMaxLength(6);
DPentry->setPlaceholderText("0");
DPentry->setAlignment(Qt::AlignCenter);
DPentry->clear();
QLabel *manualDPHint = new QLabel(tr("(0-9999) "), this);
@@ -305,15 +298,15 @@ ManualRideDialog::enterClicked()
{
if (!( ( BSentry->text().isEmpty() || BSentry->hasAcceptableInput() ) &&
( DPentry->text().isEmpty() || DPentry->hasAcceptableInput() ) &&
( HRentry->hasAcceptableInput() ) &&
( distanceentry->text().isEmpty() || distanceentry->hasAcceptableInput() ) ) ) {
( DPentry->text().isEmpty() || DPentry->hasAcceptableInput() ) &&
( HRentry->text().isEmpty() || HRentry->hasAcceptableInput() ) &&
( distanceentry->text().isEmpty() || distanceentry->hasAcceptableInput() ) ) ) {
QMessageBox::warning( this,
tr("Values out of range"),
tr("The values you've entered in:\n ")
+((!distanceentry->hasAcceptableInput() && !distanceentry->text().isEmpty() )
? " Distance (max 9999)\n " : "")
+((!HRentry->hasAcceptableInput())
+((!HRentry->hasAcceptableInput() && !HRentry->text().isEmpty() )
? " Average HR (30-199 bpm)\n " : "")
+((!BSentry->hasAcceptableInput() && !BSentry->text().isEmpty() )
? " BikeScore (max 9999)\n " : "")

View File

@@ -161,7 +161,7 @@ PwxFileReader::PwxFromDomDoc(QDomDocument doc, QStringList &errors) const
// duration - convert to end
QDomElement duration = summary.firstChildElement("duration");
if (!duration.isNull() && add.start != -1)
add.stop = beginning.text().toDouble() + add.start;
add.stop = duration.text().toDouble() + add.start;
else
add.stop = -1;

View File

@@ -34,6 +34,9 @@ TcxParser::TcxParser (RideFile* rideFile) : rideFile(rideFile)
if (GarminHWM.isNull() || GarminHWM.toInt() == 0)
GarminHWM.setValue(25); // default to 25 seconds.
// First initialisation for altitude (not initialised for each point)
alt= 0;
}
bool
@@ -71,7 +74,7 @@ TcxParser::startElement( const QString&, const QString&,
lat = 0.0;
lon = 0.0;
badgps = false;
//alt = 0.0; // TCS from FIT files have not alt point for each trackpoint
//alt = 0.0; // TCX from FIT files have not alt point for each trackpoint
distance = -1; // nh - we set this to -1 so we can detect if there was a distance in the trackpoint.
secs = 0;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -179,7 +179,7 @@
<message>
<location filename="../AllPlotWindow.cpp" line="60"/>
<source>Stacked view</source>
<translation>Stapelansicht</translation>
<translation>Gesplittete Ansicht</translation>
</message>
<message>
<location filename="../AllPlotWindow.cpp" line="90"/>
@@ -209,12 +209,12 @@
<message>
<location filename="../AllPlotWindow.cpp" line="111"/>
<source>Power + shade</source>
<translation>Leistung: Schattierung erhöhen </translation>
<translation>Leistungszonen einblenden</translation>
</message>
<message>
<location filename="../AllPlotWindow.cpp" line="112"/>
<source>Power - shade</source>
<translation>Leistung: Schattierung verringern</translation>
<translation>Leistungszonen ausblenden</translation>
</message>
<message>
<location filename="../AllPlotWindow.cpp" line="113"/>
@@ -250,7 +250,7 @@
<message>
<location filename="../BasicRideMetrics.cpp" line="367"/>
<source>Average Cadence</source>
<translation>Durchschnittliche Trittfrequenz</translation>
<translation> Trittfrequenz</translation>
</message>
<message>
<location filename="../BasicRideMetrics.cpp" line="368"/>
@@ -264,7 +264,7 @@
<message>
<location filename="../BasicRideMetrics.cpp" line="327"/>
<source>Average Heart Rate</source>
<translation>Durchschnittliche Herzfrequenz</translation>
<translation> Herzfrequenz</translation>
</message>
<message>
<location filename="../BasicRideMetrics.cpp" line="328"/>
@@ -278,7 +278,7 @@
<message>
<location filename="../BasicRideMetrics.cpp" line="287"/>
<source>Average Power</source>
<translation>ø Leistung</translation>
<translation> Leistung</translation>
</message>
<message>
<location filename="../BasicRideMetrics.cpp" line="288"/>
@@ -292,7 +292,7 @@
<message>
<location filename="../BasicRideMetrics.cpp" line="238"/>
<source>Average Speed</source>
<translation>ø Geschwindigkeit</translation>
<translation> Geschwindigkeit</translation>
</message>
<message>
<location filename="../BasicRideMetrics.cpp" line="239"/>
@@ -684,7 +684,7 @@
<message>
<location filename="../Pages.cpp" line="46"/>
<source>Portugese</source>
<translation type="unfinished"></translation>
<translation>portugisisch</translation>
</message>
<message>
<location filename="../Pages.cpp" line="74"/>
@@ -1247,7 +1247,7 @@ und dann auf&quot;Download&quot; klicken.</translation>
<source>
You may need to (re)install the FTDI or PL2303 drivers before downloading.</source>
<translation>Eventuell müssen sie (erneut) das FIDI oder PL2302 Treiberpaket installieren um fortfahren zu können.</translation>
<translation> Eventuell müssen sie (erneut) das FIDI oder PL2302 Treiberpaket installieren um fortfahren zu können.</translation>
</message>
<message>
<location filename="../DownloadRideDialog.cpp" line="112"/>
@@ -1277,7 +1277,7 @@ You may need to (re)install the FTDI or PL2303 drivers before downloading.</sour
<message>
<location filename="../DownloadRideDialog.cpp" line="179"/>
<source>This ride appears to have already </source>
<translation>Diese Trainingseinheit scheint schon</translation>
<translation>Diese Trainingseinheit scheint schon </translation>
</message>
<message>
<location filename="../DownloadRideDialog.cpp" line="180"/>
@@ -1303,12 +1303,12 @@ You may need to (re)install the FTDI or PL2303 drivers before downloading.</sour
<message>
<location filename="../DownloadRideDialog.cpp" line="195"/>
<source>Failed to remove existing file </source>
<translation>Die exisierende Datei konnte nicht überschrieben werden</translation>
<translation>Die exisierende Datei konnte nicht überschrieben werden </translation>
</message>
<message>
<location filename="../DownloadRideDialog.cpp" line="206"/>
<source>Failed to rename </source>
<translation>Umbenennen fehlgeschlagen</translation>
<translation>Umbenennen fehlgeschlagen </translation>
</message>
<message>
<location filename="../DownloadRideDialog.cpp" line="206"/>
@@ -2835,7 +2835,7 @@ Drehmomentkorrektur - Dies definiert einen Linearfaktor in Nm (oder Pfund pro Qu
<location filename="../Pages.cpp" line="2392"/>
<location filename="../Pages.cpp" line="2416"/>
<source>Rest HR</source>
<translation>Ruheherzfrequenz</translation>
<translation>Ruhepuls</translation>
</message>
<message>
<location filename="../Pages.cpp" line="2393"/>
@@ -2872,7 +2872,7 @@ Drehmomentkorrektur - Dies definiert einen Linearfaktor in Nm (oder Pfund pro Qu
on and that its display says, &quot;PC Link&quot;</source>
<translation>Stellen Sie bitte Sicher, dass der o-Synce
Macro radcomputer angeschaltet ist und
&quot;PC Link&quot; im Display anzeigt</translation>
&quot;PC Link&quot; im Display anzeigt.</translation>
</message>
</context>
<context>
@@ -3126,7 +3126,7 @@ Skipping file...</source>
<message>
<location filename="../MainWindow.cpp" line="399"/>
<source>Export to TCX...</source>
<translation type="unfinished"></translation>
<translation>Als *.tcx exportieren</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="402"/>
@@ -3151,7 +3151,7 @@ Skipping file...</source>
<message>
<location filename="../MainWindow.cpp" line="419"/>
<source>Air Density (Rho) Estimator</source>
<translation type="unfinished"></translation>
<translation>Luftdichte (Rho) Kalkulator</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="450"/>
@@ -3205,12 +3205,12 @@ Skipping file...</source>
<message>
<location filename="../MainWindow.cpp" line="733"/>
<source>Export TCX</source>
<translation type="unfinished"></translation>
<translation>Als *.tcx Datei exportieren...</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="733"/>
<source>TCX (*.tcx)</source>
<translation type="unfinished"></translation>
<translation>TCX (*.tcx)</translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="753"/>
@@ -3508,7 +3508,7 @@ Fahrer CP wurde auf %3 Watt gesetzt.</translation>
<message>
<location filename="../ManualRideDialog.cpp" line="103"/>
<source>Average HR: </source>
<translation>ø Herzfrequenz: </translation>
<translation> Herzfrequenz: </translation>
</message>
<message>
<location filename="../ManualRideDialog.cpp" line="109"/>
@@ -4549,12 +4549,12 @@ Möchten Sie fortfahren?</translation>
<message>
<location filename="../PerformanceManagerWindow.cpp" line="55"/>
<source>Use TRIMP 100</source>
<translation type="unfinished"></translation>
<translation>Verwende TRIMP 100</translation>
</message>
<message>
<location filename="../PerformanceManagerWindow.cpp" line="56"/>
<source>Use Trimp Zonal</source>
<translation type="unfinished"></translation>
<translation>Verwende Zonenbasierten TRIMP</translation>
</message>
<message>
<location filename="../PerformanceManagerWindow.cpp" line="78"/>
@@ -4775,23 +4775,23 @@ angeschaltet ist und im Display &quot;Host&quot; anzeigt.</translation>
<message>
<location filename="../RealtimeWindow.cpp" line="176"/>
<source>WATTS</source>
<translation>Watt</translation>
<translation>Leistung (W)</translation>
</message>
<message>
<location filename="../RealtimeWindow.cpp" line="178"/>
<source>BPM</source>
<translation>spm</translation>
<translation>Herzfrequenz (spm)</translation>
</message>
<message>
<location filename="../RealtimeWindow.cpp" line="52"/>
<location filename="../RealtimeWindow.cpp" line="180"/>
<source>km/h</source>
<translation>km/h</translation>
<translation>Geschwindigkeit (km/h)</translation>
</message>
<message>
<location filename="../RealtimeWindow.cpp" line="182"/>
<source>RPM</source>
<translation>rpm</translation>
<translation>Trittfrequenz (upm)</translation>
</message>
<message>
<location filename="../RealtimeWindow.cpp" line="184"/>
@@ -4814,18 +4814,18 @@ angeschaltet ist und im Display &quot;Host&quot; anzeigt.</translation>
<message>
<location filename="../RealtimeWindow.cpp" line="191"/>
<source>Avg WATTS</source>
<translation>Leistung Ø</translation>
<translation>Ø Leistung</translation>
</message>
<message>
<location filename="../RealtimeWindow.cpp" line="193"/>
<source>Avg BPM</source>
<translation>Herzfrequenz Ø</translation>
<translation>Ø Herzfrequenz</translation>
</message>
<message>
<location filename="../RealtimeWindow.cpp" line="53"/>
<location filename="../RealtimeWindow.cpp" line="195"/>
<source>Avg km/h</source>
<translation>Geschwindigkeit Ø</translation>
<translation>Ø Geschwindigkeit</translation>
</message>
<message>
<location filename="../RealtimeWindow.cpp" line="51"/>
@@ -4843,18 +4843,18 @@ angeschaltet ist und im Display &quot;Host&quot; anzeigt.</translation>
<location filename="../RealtimeWindow.cpp" line="53"/>
<location filename="../RealtimeWindow.cpp" line="195"/>
<source>Avg MPH</source>
<translation>Geschwindigkeit Ø (mi/h)</translation>
<translation>Ø Geschwindigkeit (mi/h)</translation>
</message>
<message>
<location filename="../RealtimeWindow.cpp" line="197"/>
<source>Avg RPM</source>
<translation>Trittfrequenz Ø</translation>
<translation>Ø Trittfrequenz</translation>
</message>
<message>
<location filename="../RealtimeWindow.cpp" line="199"/>
<location filename="../RealtimeWindow.cpp" line="810"/>
<source>Avg Load WATTS</source>
<translation>Belastung Ø (Watt)</translation>
<translation>Ø Belastung (Watt)</translation>
</message>
<message>
<location filename="../RealtimeWindow.cpp" line="202"/>
@@ -4884,7 +4884,7 @@ angeschaltet ist und im Display &quot;Host&quot; anzeigt.</translation>
<message>
<location filename="../RealtimeWindow.cpp" line="817"/>
<source>Avg Gradient PERCENT</source>
<translation>Durchschnittliche Steigung (%)</translation>
<translation>Ø Steigung (%)</translation>
</message>
</context>
<context>
@@ -6012,7 +6012,7 @@ Möchten Sie fortfahren?</translation>
<message>
<location filename="../TRIMPPoints.cpp" line="124"/>
<source>TRIMP(100) Points</source>
<translation>TRIMP(100) Punkte</translation>
<translation>TRIMP 100 Punkte</translation>
</message>
</context>
<context>
@@ -6088,78 +6088,78 @@ Möchten Sie fortfahren?</translation>
<message>
<location filename="../ToolsRhoEstimator.cpp" line="38"/>
<source>Air Density (Rho) Estimator</source>
<translation type="unfinished"></translation>
<translation>Luftdichte (Rho) Kalkulator</translation>
</message>
<message>
<location filename="../ToolsRhoEstimator.cpp" line="46"/>
<source>Enter measured values for the following:</source>
<translation type="unfinished"></translation>
<translation>Gebe Messwerte für folgende Werte ein:</translation>
</message>
<message>
<location filename="../ToolsRhoEstimator.cpp" line="52"/>
<source>Metric</source>
<translation type="unfinished"></translation>
<translation>metrisch</translation>
</message>
<message>
<location filename="../ToolsRhoEstimator.cpp" line="55"/>
<source>Imperial</source>
<translation type="unfinished">imperial</translation>
<translation>imperial</translation>
</message>
<message>
<location filename="../ToolsRhoEstimator.cpp" line="70"/>
<location filename="../ToolsRhoEstimator.cpp" line="181"/>
<source>Temperature (C):</source>
<translation type="unfinished"></translation>
<translation>Temperatur (°C):</translation>
</message>
<message>
<location filename="../ToolsRhoEstimator.cpp" line="74"/>
<location filename="../ToolsRhoEstimator.cpp" line="171"/>
<source>Temperature (F):</source>
<translation type="unfinished"></translation>
<translation>Temperatur (Fahrenheit):</translation>
</message>
<message>
<location filename="../ToolsRhoEstimator.cpp" line="91"/>
<location filename="../ToolsRhoEstimator.cpp" line="184"/>
<source>Air Pressure (hPa):</source>
<translation type="unfinished"></translation>
<translation>Luftdruck (hPa):</translation>
</message>
<message>
<location filename="../ToolsRhoEstimator.cpp" line="95"/>
<location filename="../ToolsRhoEstimator.cpp" line="174"/>
<source>Air Pressure (inHg):</source>
<translation type="unfinished"></translation>
<translation>Luftdruck (inHg):</translation>
</message>
<message>
<location filename="../ToolsRhoEstimator.cpp" line="112"/>
<location filename="../ToolsRhoEstimator.cpp" line="186"/>
<source>Dewpoint (C):</source>
<translation type="unfinished"></translation>
<translation>Taupunkt (°C)</translation>
</message>
<message>
<location filename="../ToolsRhoEstimator.cpp" line="116"/>
<location filename="../ToolsRhoEstimator.cpp" line="176"/>
<source>Dewpoint (F):</source>
<translation type="unfinished"></translation>
<translation>Taupunkt (Fahrenheit)</translation>
</message>
<message>
<location filename="../ToolsRhoEstimator.cpp" line="130"/>
<source>Estimated air density (rho):</source>
<translation type="unfinished"></translation>
<translation>Geschätzte Luftdichte (Rho):</translation>
</message>
<message>
<location filename="../ToolsRhoEstimator.cpp" line="138"/>
<source>(kg/m^3)</source>
<translation type="unfinished"></translation>
<translation>(kg/m^3)</translation>
</message>
<message>
<location filename="../ToolsRhoEstimator.cpp" line="147"/>
<source>(lb/ft^3)</source>
<translation type="unfinished"></translation>
<translation>(lb/ft^3)</translation>
</message>
<message>
<location filename="../ToolsRhoEstimator.cpp" line="154"/>
<source>Done</source>
<translation type="unfinished">Fertig</translation>
<translation>Fertig</translation>
</message>
</context>
<context>
@@ -6260,7 +6260,7 @@ Möchten Sie fortfahren?</translation>
<message>
<location filename="../TwitterDialog.cpp" line="42"/>
<source>Average Power</source>
<translation>Durchschnittliche Leistung</translation>
<translation> Leistung</translation>
</message>
<message>
<location filename="../TwitterDialog.cpp" line="43"/>
@@ -6270,7 +6270,7 @@ Möchten Sie fortfahren?</translation>
<message>
<location filename="../TwitterDialog.cpp" line="44"/>
<source>Average Cadence</source>
<translation>ø Trittfrequenz</translation>
<translation>Ø Trittfrequenz</translation>
</message>
<message>
<location filename="../TwitterDialog.cpp" line="45"/>
@@ -6442,7 +6442,7 @@ Möchten Sie fortfahren?</translation>
<message>
<location filename="../ViewSelection.cpp" line="40"/>
<source>Train and Racing View</source>
<translation>Echtzeitansicht</translation>
<translation>Echtzeitmodus</translation>
</message>
</context>
<context>
@@ -6743,12 +6743,12 @@ Möchten Sie fortfahren?</translation>
<message>
<location filename="../Zones.cpp" line="579"/>
<source>&lt;td align=&quot;center&quot;&gt;Low (watts)&lt;/td&gt;</source>
<translation>&lt;td align=&quot;center&quot;&gt;Untere (Watt)&lt;/td&gt;</translation>
<translation>&lt;td align=&quot;center&quot;&gt;Untere Grenze(W)&lt;/td&gt;</translation>
</message>
<message>
<location filename="../Zones.cpp" line="580"/>
<source>&lt;td align=&quot;center&quot;&gt;High (watts)&lt;/td&gt;</source>
<translation>&lt;td align=&quot;center&quot;&gt;Obere (Watt)&lt;/td&gt;</translation>
<translation>&lt;td align=&quot;center&quot;&gt;Obere Grenze( W)&lt;/td&gt;</translation>
</message>
<message>
<location filename="../Zones.cpp" line="582"/>