[SX127x] Added missing standby command

This commit is contained in:
jgromes 2019-10-27 17:12:59 +01:00
parent ff078d69dd
commit f0d9fdda11

View file

@ -467,6 +467,9 @@ int16_t SX127x::readData(uint8_t* data, size_t len) {
int16_t modem = getActiveModem(); int16_t modem = getActiveModem();
size_t length = len; size_t length = len;
// put module to standby
standby();
if(modem == SX127X_LORA) { if(modem == SX127X_LORA) {
// len set to maximum indicates unknown packet length, read the number of actually received bytes // len set to maximum indicates unknown packet length, read the number of actually received bytes
if(len == SX127X_MAX_PACKET_LENGTH) { if(len == SX127X_MAX_PACKET_LENGTH) {