fix bug in SX1278 read received message

This commit is contained in:
soypat
2024-02-18 08:21:47 -08:00
parent 3112fe1b27
commit 7b9fb67069
4 changed files with 36 additions and 22 deletions
+3 -2
View File
@@ -6,6 +6,7 @@ import (
"context"
"io"
"machine"
"strconv"
"time"
"github.com/soypat/lora"
@@ -17,7 +18,7 @@ var (
)
const (
SX127X_PIN_RST = machine.GP16
SX127X_PIN_RST = machine.GP6
// SPI definition for SX127x
SX127X_PIN_SCK = machine.GP2
@@ -59,7 +60,7 @@ func main() {
if err != nil {
return err
}
println("received LoRa:", string(rx[:n]))
println("received LoRa length", n, ":", strconv.Quote(string(rx[:n])))
return nil
})