-
Notifications
You must be signed in to change notification settings - Fork 379
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
RFM69::initialize(...) doesn't always set the radio to the same state #172
Comments
I appreciate the effort but there are two issues:
|
Makes sense! For (1), I would actually lean toward resetting all the registers, and I'd be happy to code up that PR if you'll accept it. If not, no worries--I understand. For (2), I haven't encountered the unreliability described in the forum, but maybe I've been lucky. Since I rely on ListenMode for my projects, I'd be willing to do the work to break ListenMode out into a separate library that depends on the RFM69 library if you want. If I did that, would you want it to be in the RFM69 library (like the RFM69_ATC class)? Or a whole separate Github repo/library in the Arduino library manager? And thanks for the tips about the bonus! I should probably hook up the reset jumper--it just hadn't occurred to me. X-) |
Thanks for the suggestions.
|
|
Say a radio is in listen mode, and then a new sketch that doesn't use listen mode is uploaded to the Moteino (e.g. via the Arduino IDE). When the new sketch runs
RFM69::initialize(...)
the radio stays in listen mode since nothing has told it to turn listen mode off. Only resetting the power will turn of listen mode, or making sure to always callRFM69::listenModeEnd()
right afterRFM69::initialize(...)
. The former is annoying, and the latter would force anyone to defineRF69_LISTENMODE_ENABLE
even if they're not using listen mode.Instead,
RFM69::initialize(...)
should probably turn off listen mode if it's on, regardless of whether or notRF69_LISTENMODE_ENABLE
is defined, so that calls toRFM69::initialize(...)
always put the radio into the same starting state.PR #171 fixes this by moving some of the code in
RFM69::listenModeEnd()
toRFM69::initialize()
.The text was updated successfully, but these errors were encountered: