Skip to content
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

Add preTransmission(), postTransmission() for half-duplex #44

Merged
merged 3 commits into from
Sep 11, 2016

Conversation

kintel
Copy link
Contributor

@kintel kintel commented Sep 9, 2016

This is a suggested API change to address dealing with RS-485 transceivers in half duplex mode (Issue #33).

I'm not married to this particular way of solving it, but it's tested to work on my end.

@4-20ma
Copy link
Owner

4-20ma commented Sep 10, 2016

Interested in the PR. Please fix conflicts and resubmit. Thanks.

@kintel
Copy link
Contributor Author

kintel commented Sep 10, 2016

Merged with master and resolved conflicts.

Set pre-transmission callback function.

This function gets called just before a modbus message is sent over serial.
Typical usage of this callback is to enable an RS485 transcieiver's
Copy link
Owner

@4-20ma 4-20ma Sep 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling: "transcieiver's"

- ...RS485 transcieiver's
+ ...RS485 transceiver's

@4-20ma
Copy link
Owner

4-20ma commented Sep 11, 2016

Thanks for the PR, though I think after I incorporated #43, it introduced new conflicts. I've marked up the PR with minor edits (spelling, capitalization, spacing, & convention). If you'll incorporate these and fix the merge conflict, I'm ready to merge.

@4-20ma
Copy link
Owner

4-20ma commented Sep 11, 2016

@kintel it occurred to me that we should include a simple example showing off the half-duplex feature. Do you have a simple bare-bones example to include?

@kintel
Copy link
Contributor Author

kintel commented Sep 11, 2016

@4-20ma I agree that an example would be nice. I can clean up one of my test sketches and submit that as a separate PR.

Thanks for being thorough btw. - it really helps knowing that someone actually read the code :)

@4-20ma
Copy link
Owner

4-20ma commented Sep 11, 2016

LGTM

@4-20ma 4-20ma merged commit f22723f into 4-20ma:master Sep 11, 2016
@4-20ma
Copy link
Owner

4-20ma commented Sep 11, 2016

I look forward to a simplified example that shows off how to use the half-duplex feature. Thanks for implementing. Travis CI is now implemented (compiles each example included in examples/) so it will catch the obvious build errors automatically.

@4-20ma 4-20ma changed the title Added preTransmission() and postTransmission(). Fixes #33 Add preTransmission(), postTransmission() Sep 11, 2016
@4-20ma 4-20ma changed the title Add preTransmission(), postTransmission() Add preTransmission(), postTransmission() for half-duplex Sep 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants