demo: poll: fix polling of wrong subdevice
The call to comedi_poll() always sets the subdevice parameter to 0. Set it to the subdevice that the streaming command is using.
This commit is contained in:
parent
8c31fb88c1
commit
7a8b838e66
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ void do_cmd(comedi_t *dev,comedi_cmd *cmd)
|
|||
}else if(ret==0){
|
||||
/* hit timeout */
|
||||
printf("timeout, polling...\n");
|
||||
ret = comedi_poll(device,0);
|
||||
ret = comedi_poll(device,cmd->subdev);
|
||||
printf("poll returned %d\n",ret);
|
||||
}else if(FD_ISSET(comedi_fileno(device),&rdset)){
|
||||
/* comedi file descriptor became ready */
|
||||
|
|
Loading…
Add table
Reference in a new issue