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

Inconvenient way of getting meaning of packet result and error value #67

Closed
Toreno96 opened this issue Mar 22, 2017 · 8 comments
Closed
Assignees
Labels

Comments

@Toreno96
Copy link
Contributor

I found out packet_handler::printTxRxResult and packet_handler::printRxPacketError to be a very inconvenient way of getting meaning of communication result and hardware error values, because it's enforcing the user what to do with that meaning and when, by printing it to a standard output at the moment of the call.

In my opinion, the better idea would be to have functions, which would return a proper string instead. The original ones could be kept for backward compatibility, but internally they could use the new ones.

I could even volunteer to implement them. After all, it's only a little modification to existing algorithm.

@LeonJung
Copy link
Contributor

@Toreno96

Hi,

Thank you for your will of contribution.
There is develop branch in the repository.
Please make your pull request to the develop branch so that I can see the idea.

@LeonJung
Copy link
Contributor

@Toreno96

This issue was solved by the pull request #67

@LeonJung
Copy link
Contributor

I'll check whether there is another examples with another languages which needs to be done as same,
and will close the issue.

@Toreno96
Copy link
Contributor Author

@ROBOTIS-Leon

I saw that you deprecated packet_handler::printTxRxResult and packet_handler::printRxPacketError. Did you thought about using [[deprecated]] attribute instead of runtime output? Or dependency on C++14 is unacceptable?

@LeonJung
Copy link
Contributor

@Toreno96

Hi, again

Thank you for pointing out.

Yes, obviously, the latter.
Do you have any ideas?

@Toreno96
Copy link
Contributor Author

@ROBOTIS-Leon

Hi :)

What ideas do you mean? Alternative to runtime output about deprecation and [[deprecated]] attribute?

@LeonJung
Copy link
Contributor

@Toreno96

Yes, if you have

@Toreno96
Copy link
Contributor Author

@ROBOTIS-Leon

First of all, sorry for long silence, last few months were rather busy for me.

I found this for simulating [[deprecated]] attribute when C++14 isn't available.

Additionally, C++14's solution could be accessible, too, because it is possible to check if selected feature is supported during compilation - via __cplusplus macro or via compiler vendor and version (much more reliable solution, but at the price of more time-consuming and tedious implementation).

LeonJung added a commit that referenced this issue Nov 30, 2017
… the effect on the other languages, such as matlab, labview is needed) #67 #107
LeonJung added a commit that referenced this issue Dec 1, 2017
@LeonJung LeonJung mentioned this issue Dec 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants