diff --git a/examples/lora/lorawan/atcmd/commands.go b/examples/lora/lorawan/atcmd/commands.go index 1ebcdf9..0afede7 100644 --- a/examples/lora/lorawan/atcmd/commands.go +++ b/examples/lora/lorawan/atcmd/commands.go @@ -343,10 +343,8 @@ func lw(setting string) error { if param == "NET" { if val == "ON" { lorawan.SetPublicNetwork(true) - println("SET PUBLIC NET") } else { lorawan.SetPublicNetwork(false) - println("SET PRIVATE NET") } } } diff --git a/sx127x/sx127x.go b/sx127x/sx127x.go index 0c53961..9fe6897 100644 --- a/sx127x/sx127x.go +++ b/sx127x/sx127x.go @@ -449,6 +449,7 @@ func (d *Device) Rx(timeoutMs uint32) ([]uint8, error) { // Single RX mode don't properly handle Timeouts on sx127x, so we use Continuous RX // Go routine is a workaround to stop the Continuous RX and fire a timeout Event d.SetOpMode(SX127X_OPMODE_RX) + go func() { time.Sleep(time.Millisecond * time.Duration(timeoutMs)) d.SetOpMode(SX127X_OPMODE_STANDBY) //Go standby