diff --git a/src/AddDeviceWizard.cpp b/src/AddDeviceWizard.cpp index 4ffaf061f..9c2881b9e 100644 --- a/src/AddDeviceWizard.cpp +++ b/src/AddDeviceWizard.cpp @@ -140,7 +140,7 @@ DeviceScanner::run() { active = true; bool result = false; - for (int i=0; active && !result && i<10; i++) { + for (int i=0; active && !result && i<50; i++) { // search for longer // better to wait a while, esp. if its just a USB device #ifdef WIN32 @@ -215,7 +215,6 @@ DeviceScanner::quickScan(bool deep) // scan quickly or if true scan forever, as // automatically discover a serial port ... QString error; foreach (CommPortPtr port, Serial::myListCommPorts(error)) { - if (wizard->controller->discover(port->name()) == true) { isfound = true; wizard->portSpec = port->name(); @@ -295,7 +294,6 @@ AddSearch::chooseCOMPort() if (manual->currentIndex() <= 0) { // we unselected or something. wizard->found = false; wizard->portSpec = ""; - emit completeChanged(); return; } @@ -309,8 +307,6 @@ AddSearch::chooseCOMPort() // carry on then wizard->found = true; // ugh - - emit completeChanged(); } void @@ -406,7 +402,7 @@ int AddSearch::nextId() const { // Still no dice. Go to the not found dialog - if (wizard->found == false) return -1; + if (wizard->found == false) return 60; else { switch(wizard->deviceTypes.Supported[wizard->current].type) { case DEV_ANTLOCAL : return 50; break; // pair diff --git a/src/AddDeviceWizard.h b/src/AddDeviceWizard.h index ff89513ed..767b87067 100644 --- a/src/AddDeviceWizard.h +++ b/src/AddDeviceWizard.h @@ -101,7 +101,6 @@ class AddSearch : public QWizardPage void initializePage(); int nextId() const; bool validatePage(); - bool isComplete() const { return wizard->found; } void doScan(); void scanFinished(bool); void cleanupPage(); diff --git a/src/Computrainer.cpp b/src/Computrainer.cpp index c4757a4f8..8a8716c5f 100644 --- a/src/Computrainer.cpp +++ b/src/Computrainer.cpp @@ -1024,7 +1024,7 @@ bool Computrainer::discover(QString filename) } // did we get something back from the device? - if ((rc=rawRead(handshake, 6)) != 6) { + if ((rc=rawRead(handshake, 6)) < 6) { closePort(); return false; } @@ -1032,7 +1032,6 @@ bool Computrainer::discover(QString filename) closePort(); handshake[6] = '\0'; - if (strcmp((char *)handshake, "LinkUp")) return false; else return true; }