Skip to content

Commit 4a7ea16

Browse files
committed
fix sx128x function parameter not set to type
1 parent 62663c1 commit 4a7ea16

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sx128x/sx128x.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,14 +428,14 @@ func (d *Device) SetTxParams(powerdBm int8, rampTime RadioRampTime) error {
428428

429429
// Set the number of symbols used for channel activity detection which determines the sensitivity of the detection.
430430
// This is only applicable in LoRa mode.
431-
func (d *Device) SetCadParams(cadSymbolNum uint8) error {
431+
func (d *Device) SetCadParams(cadSymbolNum CadSymbolNum) error {
432432
err := d.WaitWhileBusy(time.Second)
433433
if err != nil {
434434
return err
435435
}
436436
d.nssPin.Set(false)
437437
d.spiTxBuf = d.spiTxBuf[:0]
438-
d.spiTxBuf = append(d.spiTxBuf, cmdSetCADParams, cadSymbolNum)
438+
d.spiTxBuf = append(d.spiTxBuf, cmdSetCADParams, uint8(cadSymbolNum))
439439
err = d.spi.Tx(d.spiTxBuf, nil)
440440
d.nssPin.Set(true)
441441
return err

0 commit comments

Comments
 (0)