mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-12 02:43:42 +00:00
lorawan cleanup and optimizations:
- Remove all default loraconf default initialisation in lorawan examples (Region Settings takes care of this now) - Remove retries while receiving JoinAccept and increase LoraRX to 10s (no need to wait more than 10s) - Add constants for RegionSetting default frequencies - Standardize all lora default configurations in lora examples - Add new AT+LW=NET,(ON|OFF) command in atcmd example
This commit is contained in:
committed by
deadprogram
parent
4e687b29c3
commit
fa0cf6ec7f
@@ -337,6 +337,19 @@ func delay(setting string) error {
|
||||
|
||||
func lw(setting string) error {
|
||||
cmd := "LW"
|
||||
|
||||
param, val, hasComma := strings.Cut(setting, ",")
|
||||
if hasComma {
|
||||
if param == "NET" {
|
||||
if val == "ON" {
|
||||
lorawan.SetPublicNetwork(true)
|
||||
println("SET PUBLIC NET")
|
||||
} else {
|
||||
lorawan.SetPublicNetwork(false)
|
||||
println("SET PRIVATE NET")
|
||||
}
|
||||
}
|
||||
}
|
||||
writeCommandOutput(cmd, setting)
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user