Skip to content

Commit

Permalink
Adjust number of URC subscribers
Browse files Browse the repository at this point in the history
  • Loading branch information
MathiasKoch committed Sep 11, 2023
1 parent ca9b5a8 commit c18bd87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions ublox-short-range/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub fn new_socket_num<const N: usize, const L: usize>(sockets: &SocketSet<N, L>)
Ok(num)
}

pub(crate) const URC_CAPACITY: usize = 3;
pub(crate) const URC_CAPACITY: usize = 2;
pub(crate) const URC_SUBSCRIBERS: usize = 1;

pub struct UbloxClient<'buf, 'sub, AtCl, AtUrcCh, RST, const N: usize, const L: usize>
Expand Down Expand Up @@ -396,6 +396,7 @@ where
if let Some(ref mut pin) = self.config.rst_pin {
defmt::warn!("Hard resetting Ublox Short Range");
pin.set_low().ok();

BlockingTimer::after(Duration::from_millis(50)).wait();

pin.set_high().ok();
Expand All @@ -408,8 +409,9 @@ where
return Ok(());
}
}
return Err(Error::_Unknown);
return Err(Error::Timeout);
}

Ok(())
}

Expand All @@ -434,7 +436,7 @@ where
return Ok(());
}
}
Err(Error::_Unknown)
Err(Error::Timeout)
}

pub(crate) fn clear_buffers(&mut self) -> Result<(), Error> {
Expand Down
2 changes: 1 addition & 1 deletion ublox-short-range/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub enum Error {
SocketMemory,
SocketMapMemory,
Supplicant,
Timer,
Timeout,
ShadowStoreBug,
_Unknown,
}
Expand Down

0 comments on commit c18bd87

Please sign in to comment.