-
Notifications
You must be signed in to change notification settings - Fork 132
Refactoring of ArduinoSerial class and serial port access for clarity #179
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* this cost me at least 2 hours of wrestling until I stumbled upon this thread: #129 Adding a check for for MacOS and /var/lock being accessible so that nobody has to waste anymore time :) Once you run the command, subsequent upload succeeds.
* Since the change was made so long ago I am hoping we can go back to having this useful descriptive error. It's really nice to be reminded when the port setting may have remained from a previous project/setup.
* If port not found, switching back to error. Since the change was made so long ago I am hoping we can go back to having this useful descriptive error. It's really nice to be reminded when the port setting may have remained from a previous project/setup. * Also refactor and extract methods in the ArduinoSerial class for clarity. * Also renamed variables and method names to be consistent with Java standards.
…in into refactoring
- setting this to true allows fully skipping waiting for comm ports to disappear/appear and thus save a few seconds.
This reverts commit 15892fb.
* If port not found, switching back to error. Since the change was made so long ago I am hoping we can go back to having this useful descriptive error. It's really nice to be reminded when the port setting may have remained from a previous project/setup. * Also refactor and extract methods in the ArduinoSerial class for clarity. * Also renamed variables and method names to be consistent with Java standards.
- setting this to true allows fully skipping waiting for comm ports to disappear/appear and thus save a few seconds.
…in into refactoring
I give 100% priority to #67 right now so I will not accept these changes. Sorry for that. |
That's fine, I'll use my fork until jssc is ready. |
that is a great advantage of open source :-) |
I hope to have some time free in the comming 2 weeks to look at the jssc switch. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was trying to follow existing code ideas and lines, but made a bunch of tidying and cleanup refactors. Here is a short list:
/var/lock
on Mac OS-Xcodeformat.xml
filejava waitFor(int delay)
method that's reused acrossArduinoSerial
classjava waitForComPortsToReappear()
to hopefully improve readability, and made it shorterA.UPLOAD.FORCE_NO_WAIT_FOR_UPLOAD_PORT
if set to "true" will skip waiting for ports even for Arduino Esplora, etc.Sorry for such a big PR! I was in the car and couldn't stop :)