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 call RFM69::listenModeEnd() right after RFM69::initialize(...). The former is annoying, and the latter would force anyone to define RF69_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 not RF69_LISTENMODE_ENABLE is defined, so that calls to RFM69::initialize(...) always put the radio into the same starting state.
PR #171 fixes this by moving some of the code in RFM69::listenModeEnd() to RFM69::initialize().
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_ENABLEeven 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_ENABLEis 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().