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
|
||||
* represents that the data stream contains 1152054 bytes
|
||||
* effective data.
|
||||
* Reading from the file descriptor blocks,
|
||||
* there is a timeout of 5000 milli-Sec.
|
||||
*/
|
||||
int tmc_read(void)
|
||||
{
|
||||
|
@ -306,16 +304,29 @@ struct tmcdev * tmc_open_lan(const char *address)
|
|||
|
||||
sck = new QTcpSocket;
|
||||
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
|
||||
qApp->processEvents();
|
||||
|
||||
sck->connectToHost(address, 5555);
|
||||
|
||||
qApp->processEvents();
|
||||
|
||||
if(sck->waitForConnected(TMC_LAN_TIMEOUT) == false)
|
||||
{
|
||||
sck->abort();
|
||||
delete sck;
|
||||
sck = NULL;
|
||||
|
||||
QApplication::restoreOverrideCursor();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
QApplication::restoreOverrideCursor();
|
||||
|
||||
qApp->processEvents();
|
||||
|
||||
tmc_device = (struct tmcdev *)calloc(1, sizeof(struct tmcdev));
|
||||
if(tmc_device == NULL)
|
||||
{
|
||||
|
|
2
global.h
2
global.h
|
@ -31,7 +31,7 @@
|
|||
|
||||
|
||||
#define PROGRAM_NAME "DSRemote"
|
||||
#define PROGRAM_VERSION "0.20_1506271933"
|
||||
#define PROGRAM_VERSION "0.20_1506272131"
|
||||
|
||||
#define MAX_PATHLEN 4096
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue