-
Notifications
You must be signed in to change notification settings - Fork 1k
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
better auto-ack representation in printPrettyDetail() #706
Comments
The above proposal works. I tested the changes using the python wrapper because it was easier than writing/modifying a Linux C++ example. The following results only show relevant info from output for brevity/concisness. >>> radio.setAutoAck(0)
>>> radio.setAutoAck(1, 1)
>>> radio.setAutoAck(3, 1)
>>> radio.printPrettyDetails()
Auto Acknowledgment = 0b001010 I also fixed the "primary mode" representation using the PRIM_RX mnemonic. >>> radio.startListening()
>>> radio.printPrettyDetails()
Primary Mode = RX
>>> radio.stopListening()
>>> radio.printPrettyDetails()
Primary Mode = TX @combs If you can think of a |
This proposal costs an additional 138 byteswithout
|
I assume people will remove printPrettyDetails() when they are finalizing their project so the space usage is totally fine. |
@Avamander good point |
* fix "primary mode" output * testing proposal from #706 * Update printPrettyDetails() docs
Currently, the representation of auto-ack feature in the new
printPrettyDetails()
is dependent on the feature's configuration about pipe 0. I'll admit, this was just laziness on my behalf, but @combs meticulous testing has made a case for addressing this mistake.So, I've been thinking...
What if we use the following snippet to represent auto-ack feature:
The problem I ran into during development was that
%s
replaced with a"0bxxxxxx"
wasn't outputting correctly (seemed like the pointer to the string was not de-referencing properly). But, the use of%c
worked fine for the "Primary Mode" output... For those that noticed what @combs noticed, we are aware of the wrong mnemonic used for the "primary mode" representation. Its a simple fix that should be included with the PR that addresses this issue.The text was updated successfully, but these errors were encountered: