kopia lustrzana https://gitlab.com/Teuniz/DSRemote
Work in progress.
rodzic
0a40bc26d8
commit
e0b264d229
|
@ -191,8 +191,6 @@ int tmc_write(const char *cmd)
|
||||||
* For example, #9001152054. Wherein, N is 9 and 001152054
|
* For example, #9001152054. Wherein, N is 9 and 001152054
|
||||||
* represents that the data stream contains 1152054 bytes
|
* represents that the data stream contains 1152054 bytes
|
||||||
* effective data.
|
* effective data.
|
||||||
* Reading from the file descriptor blocks,
|
|
||||||
* there is a timeout of 5000 milli-Sec.
|
|
||||||
*/
|
*/
|
||||||
int tmc_read(void)
|
int tmc_read(void)
|
||||||
{
|
{
|
||||||
|
@ -306,16 +304,29 @@ struct tmcdev * tmc_open_lan(const char *address)
|
||||||
|
|
||||||
sck = new QTcpSocket;
|
sck = new QTcpSocket;
|
||||||
|
|
||||||
|
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||||
|
|
||||||
|
qApp->processEvents();
|
||||||
|
|
||||||
sck->connectToHost(address, 5555);
|
sck->connectToHost(address, 5555);
|
||||||
|
|
||||||
|
qApp->processEvents();
|
||||||
|
|
||||||
if(sck->waitForConnected(TMC_LAN_TIMEOUT) == false)
|
if(sck->waitForConnected(TMC_LAN_TIMEOUT) == false)
|
||||||
{
|
{
|
||||||
sck->abort();
|
sck->abort();
|
||||||
delete sck;
|
delete sck;
|
||||||
sck = NULL;
|
sck = NULL;
|
||||||
|
|
||||||
|
QApplication::restoreOverrideCursor();
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QApplication::restoreOverrideCursor();
|
||||||
|
|
||||||
|
qApp->processEvents();
|
||||||
|
|
||||||
tmc_device = (struct tmcdev *)calloc(1, sizeof(struct tmcdev));
|
tmc_device = (struct tmcdev *)calloc(1, sizeof(struct tmcdev));
|
||||||
if(tmc_device == NULL)
|
if(tmc_device == NULL)
|
||||||
{
|
{
|
||||||
|
|
2
global.h
2
global.h
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
|
|
||||||
#define PROGRAM_NAME "DSRemote"
|
#define PROGRAM_NAME "DSRemote"
|
||||||
#define PROGRAM_VERSION "0.20_1506271933"
|
#define PROGRAM_VERSION "0.20_1506272131"
|
||||||
|
|
||||||
#define MAX_PATHLEN 4096
|
#define MAX_PATHLEN 4096
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue