kopia lustrzana https://gitlab.com/Teuniz/DSRemote
Fix communication failure when pressing the "Auto" button" when using LAN connection.
rodzic
fdc8319f62
commit
045f749eb5
2
global.h
2
global.h
|
@ -35,7 +35,7 @@
|
|||
|
||||
|
||||
#define PROGRAM_NAME "DSRemote"
|
||||
#define PROGRAM_VERSION "0.37_2105291013"
|
||||
#define PROGRAM_VERSION "0.37_2105291112"
|
||||
|
||||
#define MAX_PATHLEN 1024
|
||||
|
||||
|
|
|
@ -79,6 +79,8 @@ void read_settings_thread::run()
|
|||
|
||||
char str[512]="";
|
||||
|
||||
struct timespec rqtp;
|
||||
|
||||
err_num = -1;
|
||||
|
||||
if(device == NULL) return;
|
||||
|
@ -89,7 +91,10 @@ void read_settings_thread::run()
|
|||
|
||||
if(delay > 0)
|
||||
{
|
||||
sleep(delay);
|
||||
rqtp.tv_nsec = 0;
|
||||
rqtp.tv_sec = delay;
|
||||
|
||||
while(nanosleep(&rqtp, &rqtp)) {};
|
||||
}
|
||||
|
||||
for(chn=0; chn<devparms->channel_cnt; chn++)
|
||||
|
|
|
@ -306,7 +306,10 @@ int tmclan_write(struct tmcdev *tmc_device __attribute__ ((unused)), const char
|
|||
printf("tmc_lan write: %s", buf);
|
||||
}
|
||||
|
||||
if(!strncmp(buf, "*RST", 4)) qry = 1;
|
||||
if((!strncmp(buf, "*RST", 4)) || (!strncmp(buf, ":AUT", 4)))
|
||||
{
|
||||
qry = 1;
|
||||
}
|
||||
|
||||
n = tmclan_send(buf);
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue