Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

- Enum-based TX enable mode#300

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
lmartorella wants to merge2 commits intoemelianov:master
base:master
Choose a base branch
Loading
fromlmartorella:feat/flag-tx-enable

Conversation

@lmartorella
Copy link

Hello,
It is probably better to introduce an enum-based value for the currenttxEnableDirect, to have a more self-explaining API, not requiring to look at the documentation to understand what really 'direct' mean in logic terms (e.g. from an electronic point of view, usually levels are negated, so 'direct' can be quite confusing here).

What do you think about it?
Thx! L

@milen100
Copy link

I like it ! It is a useful change.

@emelianov
Copy link
Owner

Could you refactor of Enum declaration to not break API compatibility:

enumModbusRTUTxEnableMode:bool {/**      * The TX enable pin should be high when transmitting      */TxEnableHigh= true,/**      * The TX enable pin should be low when transmitting      */TxEnableLow= false };

@lmartorella
Copy link
Author

Hi,
Rather than trying to not break ABI compatibility (not sure if Arduino libs can be released as pre-compiled binaries), I think that overloading the requests is more portable instead.
What do you think about the proposed change in the last commit?
Thx, L

@emelianovemelianov added this to the4.1.2 milestoneOct 15, 2023
@rob040
Copy link

To add my 2ct...
I think that "Direct" is a non-descript name and doesn't say anything about the logic involved. The fact that multiple users ask questions about it and that a full sentence is needed to describe it says enough.

I do like the first solution <0141b93>, but there are always more ways to achieve the same.

@lmartorella notice your ABI note v.s. API compatibility request. These libraries are source level, so ABI compatibility is never needed

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

4.1.2

Development

Successfully merging this pull request may close these issues.

4 participants

@lmartorella@milen100@emelianov@rob040

[8]ページ先頭

©2009-2025 Movatter.jp