mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-17 13:23:26 +00:00
remove debugs, go fmt
This commit is contained in:
@@ -343,10 +343,8 @@ func lw(setting string) error {
|
|||||||
if param == "NET" {
|
if param == "NET" {
|
||||||
if val == "ON" {
|
if val == "ON" {
|
||||||
lorawan.SetPublicNetwork(true)
|
lorawan.SetPublicNetwork(true)
|
||||||
println("SET PUBLIC NET")
|
|
||||||
} else {
|
} else {
|
||||||
lorawan.SetPublicNetwork(false)
|
lorawan.SetPublicNetwork(false)
|
||||||
println("SET PRIVATE NET")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
// 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
|
// Go routine is a workaround to stop the Continuous RX and fire a timeout Event
|
||||||
d.SetOpMode(SX127X_OPMODE_RX)
|
d.SetOpMode(SX127X_OPMODE_RX)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
time.Sleep(time.Millisecond * time.Duration(timeoutMs))
|
time.Sleep(time.Millisecond * time.Duration(timeoutMs))
|
||||||
d.SetOpMode(SX127X_OPMODE_STANDBY) //Go standby
|
d.SetOpMode(SX127X_OPMODE_STANDBY) //Go standby
|
||||||
|
|||||||
Reference in New Issue
Block a user