stm32/can: make latency assertion more lenient.

This commit is contained in:
Dario Nieuwenhuis 2023-08-20 10:57:28 +02:00
parent 0032f8a2ec
commit 67ca88d5a0

View File

@ -80,8 +80,8 @@ async fn main(_spawner: Spawner) {
const MIN_LATENCY: Duration = Duration::from_micros(50); const MIN_LATENCY: Duration = Duration::from_micros(50);
const MAX_LATENCY: Duration = Duration::from_micros(150); const MAX_LATENCY: Duration = Duration::from_micros(150);
assert!( assert!(
MIN_LATENCY < latency && latency < MAX_LATENCY, MIN_LATENCY <= latency && latency <= MAX_LATENCY,
"{} < {} < {}", "{} <= {} <= {}",
MIN_LATENCY, MIN_LATENCY,
latency, latency,
MAX_LATENCY MAX_LATENCY