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

More ram saving changes, as well as minor typos/ comments & serial speed normalization #4

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

Conversation

fab672000
Copy link

Fully Updated my branch to TMrh20 as all my inital ram saving changes I did last year were also there now. But since also continued to optimize ram usage now making possible the pingpair_ack and many otehr examples to run in a 512 bytes of ram chip ...

TMRh20 and others added 30 commits August 5, 2014 18:57
Seems to be the same as issue 9 affecting Due and RPi. Enabled the 140us
delay on startListening for all boards.
Introduced a bug by changing payload_size value to a static value of 32
and forgot to revert it. The commit was:

nRF24/RF24@aac1650#diff-6dbdcee25d60de0476cb76000ce10fd3

Discovered due to maniacbug#12 - Issue submitted by cbolanos79
Removed the wrong rx_flush() on RPi code after testing - caused strange
behaviour in some cases
Corrected failureDetect variable
Added delay results in better response times. The RPi is just too quick
here.
Found issue with dynamic payloads on RPi - writeType was not specified
properly for dynamic ACKs with a NOACK payload set - Identified thanks
to mannkind   - See
nRF24/RF24Network@6e25453
Previous behaviour:
1. Radio #1: Pipe 0 opened for writing (Address1), pipe 1 opened for
reading (Address2)
2. The radio would end up listening on the following pipes/addresses,
because pipe0 was not assigned a separate reading address.
Pipe0: Address1
Pipe1: Address2
3. This is generally not a problem with 2 radios, but when multicasting
with three. If two of the radios transmit to the same address, then
start listening, all three radios will be listening to the same address
on pipe0, unless pipe0 has been assigned a separate reading address

New behaviour:
1. Radio #1: Pipe 0 opened for writing (Address1), pipe 1 opened for
reading (Address2)
2. When calling radio.startListening() pipe0 is closed, because it is
not assigned a reading address
3. Pipe0 is re-opened for writing only, unless a reading address is
assigned to pipe0

This wouldn't really affect things while using auto-ack, because two
radios should not be writing to the same pipe/address.

- Add closeReadingPipe for RPi
- Also adjusted timing for startListening();
- Fix failure detect variable on RPi
- Added ATTiny example per tong67, issue maniacbug#17
- included print functions in #define MINIMAL per Damme, issue maniacbug#16
- add #define RF24_TINY for simplification
When using dynamic payload lengths, payloads can be corrupted, and the
length will return 0. This adds a small delay to allow recovery time,
and prevent excessive errors.
- Add function to check if the rx fifo has been filled and potentially
overloaded
- TX FIFO is now only flushed when transitioning between reading/writing
as start/stopListening() is called IF dynamic payloads are enabled
- Added delay to first call to available()
a: Only delays IF called after startListening AND called less than a
certain time after the last time it was called
- Corrected mistake on last commit where flush_rx was added back
inadvertently
Change the binary constants to hex.
Fix "warning: binary constants are a GCC extension".
All I can say is it compiled in IDE 1.5.7...
 - Changes in the pin layout table to describe how to connect the NRF24L01 pins to different boards
 - Remove duplicate readme information in the RPi readme file and point to the default RPi/RF24/readme.md file.
Choose a standard pin layout for all the examples based on the pin connection table in the readme files.
Different pin layout in the example files could lead to not working examples.
Select a standard pin layout for the examples and update README files.
http://www.airspayce.com/mikem/bcm2835/bcm2835-1.37.tar.gz

- Merge with latest BCM2835 driver changes
- Should allow full support for RPi B+ but is untested
http://www.airspayce.com/mikem/bcm2835/bcm2835-1.37.tar.gz

- Merge with latest BCM2835 driver changes
- Should allow full support for RPi B+ but is untested

... not sure why the .h file was left out the first time...
Per a tip from Andrew A. this should be the final nail in the coffin of
issue gnulnulf#7
 - Changes in the pin layout table to describe how to connect the NRF24L01 pins to different boards
 - Remove duplicate readme information in the RPi readme file and point to the default RPi/RF24/readme.md file.
Choose a standard pin layout for all the examples based on the pin connection table in the readme files.
Different pin layout in the example files could lead to not working examples.
http://www.airspayce.com/mikem/bcm2835/bcm2835-1.37.tar.gz

- Merge with latest BCM2835 driver changes
- Should allow full support for RPi B+ but is untested
http://www.airspayce.com/mikem/bcm2835/bcm2835-1.37.tar.gz

- Merge with latest BCM2835 driver changes
- Should allow full support for RPi B+ but is untested

... not sure why the .h file was left out the first time...
Per a tip from Andrew A. this should be the final nail in the coffin of
issue gnulnulf#7
TMRh20 and others added 30 commits April 18, 2015 08:39
Fix over reading a buffer by 1 byte

nRF24/RF24#101
Per nRF24/RF24#101 (comment)
initialize pipe0_reading_address[0] to address "Weird and unstable
behavior of python wrapper" identified by @kormitigrov   Resolution/Root
Cause identified by mz-fuzzy
Serial connection baudrates should be same in all examples.
Serial baudrates should be the same in all examples.
Changed baudrate to match other examples.
- Fix for compatibility with SoftSPI and SPI_UART
- I seemed to be running two different versions, fixed for compatibility
between RPi and Arduino
Fix incorrect setting
- Remove unneeded lines from RF24_config.h
- Add doc info for Ack Payloads
- Add \t character to strings that would have had it inserted by code
- Adjust code to no longer insert extra tab
Per comments by @crcastle #125 add support for ESP8266 SOC devices
1. Redefine STATUS as NRF_STATUS
2. Add ESP8266 specific defines to Arduino config:
#if defined (ARDUINO_ARCH_ESP8266)
#include <pgmspace.h>
#define PRIPSTR "%S"
#define printf_P printf
Added getChannel Method to allow for verification of the configured c…
Merge  latest improvements from TMrh20 branch (i.e. Due, RPi, BBB, ATTiny, MRAA).
…saving now more than half of the ram used by continuing using serial.println calls when no expensive printf is necessary.

Fixed a typo in comments.
Fixed serial bauds to match most of other examples
…out) from that example to harmonize it with other examples code.
Fixed one Flash memory macro was missing, put it back so now this example is also using less RAM.
…ssing F() macro in originally already optimized code
…ly remove printf calls by using Serial.print(val, HEX) form instead ; but would then need to assert that the output format has no unexpected display artifact, so letting those unchanged for now and will optimize the rest later.
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.