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

Bugs fixes and enhancements #2

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

Conversation

gcopeland
Copy link
Contributor

My master has changes which include a write() bug fix and dynamic timeout adjustment, multi SPI device compatibility, additional printDetails() debugging output (nice improvements BTW), some comment clean ups, a US/internationally friendly default channel, and some minor changes to pingpair for my own local testing. The pingpair changes can be ignored.

The bug fix on write() now monitors the proper radio register. Also included in this code is deadlock timeout logic which dynamically adjusts based on current ARD/ARC hardware configuration.

IMOHO, the bugfix and dynamic timeout adjustment alone is worth the pull.

Cheers,

@maniacbug
Copy link
Owner

Thanks, I look forward to checking it out. Have you merged my master in prior to this?

-----Original Message-----
From: gcopeland
Sent: Wednesday, August 17, 2011 10:47 AM
To: [email protected]
Subject: [RF24] Bugs fixes and enhancements (#2)

My master has changes which include a write() bug fix and dynamic timeout adjustment, multi SPI device compatibility, additional printDetails() debugging output (nice improvements BTW), some comment clean ups, a US/internationally friendly default channel, and some minor changes to pingpair for my own local testing. The pingpair changes can be ignored.

The bug fix on write() now monitors the proper radio register. Also included in this code is deadlock timeout logic which dynamically adjusts based on current ARD/ARC hardware configuration.

IMOHO, the bugfix and dynamic timeout adjustment alone is worth the pull.

Cheers,

Reply to this email directly or view it on GitHub:
#2

@maniacbug
Copy link
Owner

Ok, I see now that you did merge the master in.  Yay.  That should make it a little easier.

  1. Calculated write() timeouts.  Looks like a good enhancement.  Will certainly fold this in.
  2. SPI speed.  As long as it passes the tests, its fine w/ me.
  3. Default channel.  Sounds reasonable.  Could you write up something for the docs to explain why it's the best choice?
  4. printf_P PA Power. Looks good.  I see you got the hang of how I want to do these.  :)  You can also see that I did want this info, just wanted it printed nicely.

Regarding a bug in 'write()'.  I do not see a bug in write() in the master branch of my repo.  "status = read_register(OBSERVE_TX,&observe_tx,1);" is a perfectly legitimate way of reading the status.  It's that way so that in SERIAL_DEBUG mode I can print out the value of observe_tx, otherwise it's ignored.

There definitely was a bug in the version you had, but you had a pretty old drop.  I had fixed the bug in there already.

For the SPI stuff, it's not clear what is being done here.  What is the user benefit of b762847 ?

stanleyseow referenced this pull request in stanleyseow/RF24 Mar 12, 2013
Request to merge codes ...
Radio is now allowed to enter standby. This allows for the removal of
needless delays within the driver. Additional timings optimizations.
If applications desire additional power savings, they should manually
power down the radio as needed.

Multicast write support added.

::write timeout monitoring logic changed to emcompass worst timeouts
for retries/timeouts. Should never trigger anyways...but better safe.

Fixes write retries timeout bug.

Proper hardware delay added to powerUp. Was previously part of
startWrite; which needlessly added overhead to every write/startWrite.

Allows for query of hardware channel.

PA documentation fixes.
calculated based on current hardware configuration. There is room
for optimization via caching.
loss of resolution and the possibility of a premature timeout. The
write monitoring loop now uses us rather than ms to be more compatible
with the us result returned from getMaxTimeout.
a bool for multicasting. Documentation updates.
artificial delay. Examples use more options. Added a new multicast
examples based on pingpair_dyn; pingpair_multi_dyn.
RF24.h. Fixed some radio power up/down issues in code which relied
on side effect behavior of radio powering down after every TX.
Applications now take responsibility for power management.
these flushed, it should do it. Otherwise, properly behaving
applications should need this. Also, by not flushing it opens
the door for additional retransmission features down the road.
slows things down. Its now where it needs to be. Dang.
@farconada
Copy link

What about this PR? I'm considering gcopeland version but I think that It should be merged

@karanlyons
Copy link

This PR would be great to merge in, especially the multi SPI support (the commit you called out, @maniacbug).

Currently your RF24 library assumes it’s the only thing using SPI, and that the NRF is the only slaved device. If you have multiple devices that you want to communicate with, your library will likely break because it doesn’t properly reset the SPI configuration before attempting to communicate with the radio (so it’ll get whatever configuration was last set, which’ll be for another device, and may not match the NRF’s spec).

@FrankOcean11
Copy link

im having issues tx values from imu to map calls i made for servo use, i notice in terminal i got some values being produce by the imu in master but in the terminal window for slave i have a servo and it only moves IF i restart the master terminal and only then it will tx to the rx terminal only one time so this mens i have to keep resetting the window so that i can tx imu value from a array to the slave and by the time that happens im sending old values whos data you cant match to the tx terminal, any clue why or is this fix you made to the write() is the reason why ?
capture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants