climategadgets / servomaster

Platform and hardware Independent servo controller driver

Home Page:https://climategadgets.github.io/servomaster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Protect the controller and servos from their listeners

climategadgets opened this issue · comments

Current implementation of silentStatusChanged() (in the controller and the servo),exception() (in the controller and the servo), positionChanged() and actualPositionChanged() allows the listeners to sabotage the servo by either throwing an exception or getting stuck. Need to fire a set of messengers to all listeners and notify them asynchronously, in correct order. Further need to protect the messenger queue from a listener getting stuck, and log a message about that.