From 2c5aced70fc71f57d6eda610ab9af28bfccffe86 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Thu, 9 May 2013 19:25:03 +0100 Subject: [PATCH] PWX support make/model for TP.com upload .. on request from TrainingPeaks we now add the make and model elements to a PWX file. Fixes #593 --- src/PwxRideFile.cpp | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/PwxRideFile.cpp b/src/PwxRideFile.cpp index 39ae6645b..35ddfde96 100644 --- a/src/PwxRideFile.cpp +++ b/src/PwxRideFile.cpp @@ -365,18 +365,25 @@ PwxFileReader::writeRideFile(MainWindow *main, const RideFile *ride, QFile &file root.appendChild(goal); } + // device type + if (ride->deviceType() != "") { - // device type - if (ride->deviceType() != "") { - QDomElement device = doc.createElement("device"); + QDomElement device = doc.createElement("device"); device.setAttribute("id", ride->deviceType()); - QDomElement make = doc.createElement("make"); - text = doc.createTextNode(ride->deviceType()); - make.appendChild(text); - device.appendChild(make); - root.appendChild(device); - } + QDomElement make = doc.createElement("make"); + text = doc.createTextNode("Golden Cheetah"); + make.appendChild(text); + device.appendChild(make); + + QDomElement model = doc.createElement("model"); + text = doc.createTextNode(ride->deviceType()); + model.appendChild(text); + device.appendChild(model); + + root.appendChild(device); + } + // time QDomElement time = doc.createElement("time"); text = doc.createTextNode(ride->startTime().toString(Qt::ISODate));