This commit is contained in:
Alex Janka 2024-02-12 13:56:21 +11:00
parent 29019096e3
commit 942d3cc3cf

View file

@ -75,14 +75,15 @@ async fn main() {
// and to the charge rate controller thread
let (tcrc_requests, mut tcrc_receiver) = tokio::sync::mpsc::unbounded_channel();
// try to spawn the pli loop
let pl_state = match {
let pli = {
let config = access_config();
Pli::new(
config.serial_port.clone(),
config.baud_rate,
config.pl_timeout_milliseconds,
)
} {
};
let pl_state = match pli {
Ok(mut pli) => {
let pl_state = pli.state.clone();
tokio::task::spawn(async move {