mirror of
https://github.com/Maschell/HIDtoVPADNetworkClient.git
synced 2024-11-22 14:09:17 +01:00
Fixed possible problem with the LinuxDevInputController
This commit is contained in:
parent
82a25e0cf4
commit
3918a71627
@ -62,7 +62,7 @@ public abstract class Controller implements Runnable{
|
||||
if(newData != null){
|
||||
setLatestData(newData);
|
||||
}
|
||||
Utilities.sleep(10);
|
||||
doSleepAfterPollingData();
|
||||
}
|
||||
synchronized (shutdownLock) {
|
||||
shutdownState = shutdown;
|
||||
@ -73,6 +73,10 @@ public abstract class Controller implements Runnable{
|
||||
}
|
||||
}
|
||||
|
||||
protected void doSleepAfterPollingData() {
|
||||
Utilities.sleep(10);
|
||||
}
|
||||
|
||||
@Synchronized("dataLock")
|
||||
private void setLatestData(byte[] newData) {
|
||||
this.latestData = newData;
|
||||
|
@ -126,6 +126,11 @@ public class LinuxDevInputController extends Controller implements Runnable{
|
||||
return newData;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doSleepAfterPollingData() {
|
||||
//This is event driven (aka pollLatestData() is blocking anyway until we have data), we don't need to sleep it all.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroyDriver() {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user