Added a single #define

That's it.  Literally a single #define that determines how many
milliseconds the OS waits before reconnecting.  Fixed an error with
Windows not reading it on new mobo, hopefully fixes it under OS X as
well.
This commit is contained in:
EspoTek 2016-11-10 17:39:40 +11:00
parent 8d0f6dbeeb
commit d69bbf8e68
19 changed files with 4 additions and 2 deletions

Binary file not shown.

View File

@ -22,5 +22,7 @@ extern double SERIAL_DELAY;
#define DEBUG_SETTINGSDOTSET
#define COLUMN_BREAK 749
#define USB_RECONNECT_PERIOD 250
#endif // DESKTOP_SETTINGS_H

Binary file not shown.

View File

@ -6,8 +6,8 @@ unixUsbDriver::unixUsbDriver(QWidget *parent) : genericUsbDriver(parent)
{
unsigned char error = 1;
while(error){
QThread::msleep(USB_RECONNECT_PERIOD);
error = usbInit(0x03eb, 0xa000);
if(error)QThread::msleep(64);
}
setDeviceMode(deviceMode);
newDig(digitalPinState);

View File

@ -5,7 +5,7 @@ winUsbDriver::winUsbDriver(QWidget *parent) : genericUsbDriver(parent)
//This opens the USB connection. Nothing can continue until the board is up and running.
bool connected = false;
while(!connected){
QThread::msleep(32);
QThread::msleep(USB_RECONNECT_PERIOD);
connected = usbInit(0x03eb, 0xa000);
}