satman: fixed timeout millisecond/u64 mismatch

This commit is contained in:
mwojcik 2021-08-30 15:06:46 +02:00
parent be0baf5da8
commit db9b744825

View File

@ -20,7 +20,7 @@ fn rep_link_rx_up(repno: u8) -> bool {
enum RepeaterState {
Down,
SendPing { ping_count: u16 },
WaitPingReply { ping_count: u16, timeout: u64 },
WaitPingReply { ping_count: u16, timeout: Milliseconds },
Up,
Failed
}
@ -169,7 +169,7 @@ impl Repeater {
}
fn recv_aux_timeout(&self, timeout: u32, timer: GlobalTimer) -> Result<drtioaux::Packet, drtioaux::Error> {
let max_time = timer.get_time() + Milliseconds(timeout);
let max_time = timer.get_time() + Milliseconds(timeout.into());
loop {
if !rep_link_rx_up(self.repno) {
return Err(drtioaux::Error::LinkDown);