-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OnCapabilitiesRecieved Missing #33
Comments
Hi Marina, You can achieve this using low-level message handlers: IODevice device = new FirmataDevice(port);
device.addProtocolMessageHandler(FirmataEventType.PIN_CAPABILITIES_MESSAGE, new Consumer<Event>() {
@Override
public void accept(Event evt) {
//do the stuff here
}
});
device.start(); That will basically add another handler to already registered one which you amend in #34. Since additional delay is required only for Adafruit Feather 32u4 board, I beleive it would be better to handle delays in such an additional handler. |
On the second thought the original design with delays is poorly implemented anyway. I think that all the pin state requests should be queued and sent only when response for the previous one is received. This approach yields robust and performant solution. I beleive the primary handler should be redisigned because this exact place generates new issues with noticable frequency. |
Hey @kurbatov ! When will your latest commit be available via Android gradle? Currently I still get the old commit. Currently using: implementation 'com.github.kurbatov:firmata4j:2.3.7' Thanks |
I have released 2.3.8 which contains update of pin initialization. Besides of that it contains a new event type The new release will be available soon via Maven Central. |
We need a callback when mFirmata.sendMessage(REQUEST_CAPABILITY); finishes.
Or when the pin list gets filled.
Or did I miss it somewhere?
Kind Regards
The text was updated successfully, but these errors were encountered: