Bad State After Haptic Feedback
In my app, I stream quaternion values via SensorFusion from the board and trigger haptic feedback on the boards when they rotate over a certain value. The users decide when to start or end the session, I remove routes and perform a reconnection on the boards between each session.
My problem is sometimes during a session boards will stop giving haptic feedback (while they continue streaming without any issues), and if that happens, I can't reset or restart connection on the board, I can't get haptic feedback on new sessions, while still being able to stream values without an issue.
I said sometimes because despite being as identical as humanly possible with each session, I couldn't find an exact scenario when the issue appears, it doesn't happen in every session but it's not a very rare occurence either
If I comment out my startMotor() call there's absolutely no issue with restarts/resets
I call startMotor in the stream subscriber if the current data's angle is bigger than certain threshold value, is that a problem? What's the best practice for giving haptic feedback to the user for my case? Would appreciate any help or ideas, thanks!