Update for rust-lorawan and lora-phy version 2.
This commit is contained in:
@ -35,16 +35,8 @@ async fn main(_spawner: Spawner) {
|
||||
|
||||
let iv = GenericSx126xInterfaceVariant::new(nss, reset, dio1, busy, None, None).unwrap();
|
||||
|
||||
let mut delay = Delay;
|
||||
|
||||
let mut lora = {
|
||||
match LoRa::new(
|
||||
SX1261_2::new(BoardType::RpPicoWaveshareSx1262, spi, iv),
|
||||
false,
|
||||
&mut delay,
|
||||
)
|
||||
.await
|
||||
{
|
||||
match LoRa::new(SX1261_2::new(BoardType::RpPicoWaveshareSx1262, spi, iv), false, Delay).await {
|
||||
Ok(l) => l,
|
||||
Err(err) => {
|
||||
info!("Radio error = {}", err);
|
||||
@ -97,7 +89,7 @@ async fn main(_spawner: Spawner) {
|
||||
}
|
||||
};
|
||||
|
||||
match lora.sleep(&mut delay).await {
|
||||
match lora.sleep(false).await {
|
||||
Ok(()) => info!("Sleep successful"),
|
||||
Err(err) => info!("Sleep unsuccessful = {}", err),
|
||||
}
|
||||
|
Reference in New Issue
Block a user