da7a05ecd8
A new CommandPend class is introduced. It functions basically as an ArrayBlockingQueue of size 1. Difference is that it can handle two functions from two different threads - trample(cmd): removes the previously kept command (if there is such) and overrides it with the next command - offer(cmd): keeps the given command, but only if it doesn't currently keeps an older one This new functionality is used so the UI can get commands from the controller (but only take into account the latest one). At the same time it gets tick commands from its clock ticker, but only keep and handle those if it doesn't have a real controller command to handle. |
||
---|---|---|
.. | ||
src | ||
build.gradle | ||
gradlew |