main: be more verbose when we cant launch a sim data task

This commit is contained in:
2025-12-24 09:19:16 +01:00
parent da60b6ddf5
commit cbab48c37f

View File

@@ -137,9 +137,10 @@ async fn main(spawner: Spawner) {
let mut buf = [8; 1024]; let mut buf = [8; 1024];
let partitions = esp_bootloader_esp_idf::partitions::read_partition_table(&mut storage, &mut buf).unwrap(); let partitions = esp_bootloader_esp_idf::partitions::read_partition_table(&mut storage, &mut buf).unwrap();
for sim_data in SimDataTable::open(storage, partitions).expect("Could not find partition for sim data!") { for sim_data in SimDataTable::open(storage, partitions).expect("Could not find partition for sim data!") {
info!("Found simulation data for {:?}", sim_data.srcid()); let srcid = sim_data.srcid();
if spawner.spawn(renderbug_embassy::tasks::simulation::simulation_task(sim_data, garage.motion.dyn_sender())).is_err() { info!("Found simulation data for {srcid:?}");
error!("Unable to spawn simulation task! Increase the task pool size."); if spawner.spawn(renderbug_embassy::tasks::simulation::simulation_task(sim_data, motion_bus.dyn_sender())).is_err() {
error!("Unable to spawn simulation task for {srcid:?}! Increase the task pool size.");
} }
} }
} }