-
Notifications
You must be signed in to change notification settings - Fork 26
fix frequency setter and misc items #7
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple small things. Thanks!
README.rst
Outdated
The baud rate may be specified as an keyword parameter when initializing the board. | ||
To set it to 1000000 use : | ||
.. code-block:: python# Initialze RFM radio | ||
.. code-block:: python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks like a merge error.
# Go back to idle mode after transmit. | ||
self.idle() | ||
if timed_out: | ||
raise RuntimeError('Timeout during packet send') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
adafruit_rfm69.py
Outdated
# Listen again if necessary and return the result packet. | ||
if keep_listening: | ||
self.listen() | ||
if not timed_out: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invert this and return None early. That simplifies the code below it
README.rst
Outdated
.. code-block:: python | ||
# Initialze RFM radio | ||
rfm9x = adafruit_rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ,baudrate=1000000) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clearly, am not formatting this correctly -- What am I doing wrong?
@tannewt Are there more changes needed? Let me know if I missed something. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for the ping.
Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM69 to 1.1.3 from 1.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_RFM69#8 from jerryneedell/jerryn_fixpylint > Merge pull request adafruit/Adafruit_CircuitPython_RFM69#7 from jerryneedell/jerryn_fix_freq Updating https://github.com/adafruit/Adafruit_CircuitPython_STMPE610 to 1.0.1 from 0.8.0: > Merge pull request adafruit/Adafruit_CircuitPython_STMPE610#5 from jerryneedell/jerryn_fixpylint > Merge pull request adafruit/Adafruit_CircuitPython_STMPE610#4 from jerryneedell/jerryn_fixspi > Merge pull request adafruit/Adafruit_CircuitPython_STMPE610#2 from adafruit/tannewt-patch-1
This fixes the frequency setter to correctly set fewquency_mhz.
I also added a timeout to the send function to avoid a potential hang.
the parameters to set the send/receive timeouts were renamed from timeout_s to timeout to be compatible with the standard naming conventions.
The deafault SPI baudrate was lowered to 5MHz as was done for the RF95x to avoid problems with the breakout boards.
Note : I cannot make any sense of the RSSI readings from this module. I did not change the way they are reported and this issue was present in the current release, but the values reported are much lower than expected and much lower than those reported by Arduino.
I tested this with both an RFM69HCW featherwing and an RFM69HCW breakout board