diff --git a/ground/src/experimental/USB_UPLOAD_TOOL/main.cpp b/ground/src/experimental/USB_UPLOAD_TOOL/main.cpp index 542c14ff1..7cee37dc3 100644 --- a/ground/src/experimental/USB_UPLOAD_TOOL/main.cpp +++ b/ground/src/experimental/USB_UPLOAD_TOOL/main.cpp @@ -7,10 +7,10 @@ int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QString filename; - if(argc < 1) - filename = QString("C:\\OpenPilot.bin"); + if(argc < 2) + filename = QString("C:/OpenPilot.bin"); else - filename = QString(argv[0]); + filename = QString(argv[1]); OP_DFU dfu; // dfu.enterDFU(1); diff --git a/ground/src/experimental/USB_UPLOAD_TOOL/op_dfu.cpp b/ground/src/experimental/USB_UPLOAD_TOOL/op_dfu.cpp index 7b6d57bdd..1bc2b7696 100644 --- a/ground/src/experimental/USB_UPLOAD_TOOL/op_dfu.cpp +++ b/ground/src/experimental/USB_UPLOAD_TOOL/op_dfu.cpp @@ -236,7 +236,7 @@ void OP_DFU::EndOperation() hidHandle.receive(0,buf,BUF_LEN,5000); qDebug() << result << " bytes sent"; } -void OP_DFU::UploadFirmware(QString sfile) +void OP_DFU::UploadFirmware(const QString &sfile) { enterDFU(1); QFile file(sfile); @@ -247,6 +247,7 @@ void OP_DFU::UploadFirmware(QString sfile) return; } QByteArray arr=file.readAll(); + qDebug()<<"Bytes Loaded="<