add: implement UART-based serial configuration handling and improve error handling in charge indicator updates

This commit is contained in:
2026-01-05 19:57:57 +01:00
parent 8fc2a89503
commit 1de40085fb
5 changed files with 124 additions and 24 deletions

View File

@@ -11,7 +11,8 @@ use crate::hal::{
};
use crate::log::{LogMessage, LOG_ACCESS};
use alloc::boxed::Box;
use alloc::string::ToString;
use alloc::string::{String, ToString};
use alloc::vec;
use async_trait::async_trait;
use canapi::id::{classify, plant_id, MessageKind, IDENTIFY_CMD_OFFSET};
use canapi::SensorSlot;
@@ -130,6 +131,7 @@ pub struct V4<'a> {
>,
twai_config: Option<TwaiConfiguration<'static, Blocking>>,
can_power: Output<'static>,
extra1: Output<'a>,
extra2: Output<'a>,
}
@@ -254,7 +256,7 @@ pub(crate) async fn create_v4(
charger,
extra1,
extra2,
can_power,
can_power
};
Ok(Box::new(v))
}