canbus debugging
This commit is contained in:
@@ -358,6 +358,7 @@ impl<'a> BoardInteraction<'a> for V4<'a> {
|
||||
}
|
||||
async fn measure_moisture_hz(&mut self) -> FatResult<Moistures> {
|
||||
self.can_power.set_high();
|
||||
Timer::after_millis(1000).await;
|
||||
let config = self.twai_config.take().expect("twai config not set");
|
||||
let mut twai = config.into_async().start();
|
||||
|
||||
@@ -377,6 +378,7 @@ impl<'a> BoardInteraction<'a> for V4<'a> {
|
||||
|
||||
async fn detect_sensors(&mut self, request: Detection) -> FatResult<Detection> {
|
||||
self.can_power.set_high();
|
||||
Timer::after_millis(1000).await;
|
||||
let config = self.twai_config.take().expect("twai config not set");
|
||||
let mut twai = config.into_async().start();
|
||||
|
||||
@@ -409,7 +411,7 @@ impl<'a> BoardInteraction<'a> for V4<'a> {
|
||||
// Try a few times; we intentionally ignore rx here and rely on stub logic
|
||||
let resu = twai
|
||||
.transmit_async(&frame)
|
||||
.with_timeout(Duration::from_millis(3000))
|
||||
.with_timeout(Duration::from_millis(500))
|
||||
.await;
|
||||
match resu {
|
||||
Ok(_) => {}
|
||||
|
||||
Reference in New Issue
Block a user