If no commands have been received in 10 seconds, but the Needle UI (indicator seen on Emotiscope when you adjust the Brightness slider) is still open, this means Emotiscope missed the "slider_touch_end" command from the app, potentially due to a client-side refresh. The UI should force itself closed after inactivity to maintain things.
if ( UI is open ){
if ( last command received >= 10 seconds ago ){
force close the UI
}
}
However, a trade off with this solution is that users who are intentionally holding the slider down for more than 10 seconds (for whatever reason) will see the UI desync from them and force close itself. Oh well. Better than having it get stuck. Also, the web app should send a "close the UI" packet or two upon loading anyways, also to help with potential desync.
Normally, the Needle UI waits for the "slider_touch_end" command to arrive to close itself, so that the UI will remain open even when you aren't moving the slider, as long as your thumb is still on it. That's something that was impossible on Sensory Bridge: knowing if the knobs were not only being turned, but still being touched if they weren't in motion.
If no commands have been received in 10 seconds, but the Needle UI (indicator seen on Emotiscope when you adjust the Brightness slider) is still open, this means Emotiscope missed the "slider_touch_end" command from the app, potentially due to a client-side refresh. The UI should force itself closed after inactivity to maintain things.
However, a trade off with this solution is that users who are intentionally holding the slider down for more than 10 seconds (for whatever reason) will see the UI desync from them and force close itself. Oh well. Better than having it get stuck. Also, the web app should send a "close the UI" packet or two upon loading anyways, also to help with potential desync.
Normally, the Needle UI waits for the "slider_touch_end" command to arrive to close itself, so that the UI will remain open even when you aren't moving the slider, as long as your thumb is still on it. That's something that was impossible on Sensory Bridge: knowing if the knobs were not only being turned, but still being touched if they weren't in motion.