From dc18724d171dd7e074f3bd464d908aa18ed56a6c Mon Sep 17 00:00:00 2001 From: Olivier Fauchon Date: Mon, 30 Jan 2023 23:49:20 +0100 Subject: [PATCH] remove debugs, go fmt --- examples/lora/lorawan/atcmd/commands.go | 2 -- sx127x/sx127x.go | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) 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