receiver loops forever; add errWrap

This commit is contained in:
soypat
2023-05-22 08:12:32 -03:00
parent 06c18d75cd
commit 048f89366f
2 changed files with 15 additions and 10 deletions
+2 -2
View File
@@ -479,8 +479,8 @@ func (d *DeviceLoRa) RxContinuous(ctx context.Context, fn rxCallback) error {
if err != nil {
return err
} else if op != OpRx {
return errors.New("unexpected op mode change during RxContinuous to " +
op.String() + " with irqs:" + irqFlagsString(irq))
return d.wrapErr(errors.New("unexpected op mode change during RxContinuous to " +
op.String() + " with irqs:" + irqFlagsString(irq)))
}
}
return ctx.Err()