-
Notifications
You must be signed in to change notification settings - Fork 18
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
[Feature]: Add disconnect/reconnect function in Arduino library to be able to manually control connection via board #14
Comments
What should this do ? This will not reset the whole arduino as the reset button does. If you need an actual Arduino reset, you can use a dedicated button on your controller. If you want you can unsubscribe all the channel and stop sending messages to KSP. It will remove all the traffic on the serial connection. What should the call to On the other end, a call to |
Does unsubscribing from every channel also end the serial connection? In the case of my board, the arduino sometimes has to do other things that aren't part of simpit, and sometimes it needs the serial connection to do that. It would be nice to be able to script the start/stop in the arduino code so it can handle the switch between modes automatically. |
You can call Serial.end if you need to close the connection. |
That doesn't appear to allow the arduino to reconnect again, and a reset is neccesary either way. |
Do you still need this? |
In fact... give me an hour.... |
This could function as a 'soft' reset to handle times when the connection has problems. Most boards have the arduino located inside and potentially inaccessible, so pressing the reset button may not be an option.
A simple callable set of functions would be ideal, maybe "mysimpit.connect, mysimpit.disconnect".
The text was updated successfully, but these errors were encountered: