ARMmbed / mbed-semtech-lora-rf-drivers

Semtech's LoRa RF drivers for mbed OS
Other
31 stars 25 forks source link

Possible Typo in `SX127x_LoRaRadio::set_low_power_mode` #20

Closed mattbrown015 closed 6 years ago

mattbrown015 commented 6 years ago

Description

I've spotted a possible typo in SX1272_LoRaRadio::set_low_power_mode and SX1276_LoRaRadio::set_low_power_mode.

I was just perusing and noticed the handling of rxctl looked a bit asymmetric. I've no real idea about what's going so I could well be wrong!

void SX1272_LoRaRadio::set_low_power_mode(bool status)
{
...
        if (_rf_ctrls.txctl != NC) {
            _txctl = 0;
        }

        if (_rf_ctrls.txctl != NC) {
            _rxctl = 0;
        }
}

Looks to me like _rf_ctrls.txctl is repeated and the second one should be _rf_ctrls.rxctl.

I guess usually txctl and rxctl are either both connected or both not connected.

Issue request type

[ ] Question
[ ] Enhancement
[X] Bug

ciarmcom commented 6 years ago

ARM Internal Ref: IOTCELL-996

kivaisan commented 6 years ago

Closing the issue as fixed.