update: improve documentation and restructure code for modular hardware integration, add CAN communication to HAL, and update KiCad layouts
This commit is contained in:
@@ -541,15 +541,15 @@ impl PlantHal {
|
||||
}
|
||||
};
|
||||
|
||||
let board_hal: Box<dyn BoardInteraction + Send> = match config.hardware.board {
|
||||
BoardVersion::Initial => {
|
||||
initial_hal::create_initial_board(free_pins, config, esp)?
|
||||
}
|
||||
BoardVersion::V4 => {
|
||||
let board_hal: Box<dyn BoardInteraction + Send> = //match config.hardware.board {
|
||||
//BoardVersion::Initial => {
|
||||
// initial_hal::create_initial_board(free_pins, config, esp)?
|
||||
//}
|
||||
//BoardVersion::V4 => {
|
||||
v4_hal::create_v4(free_pins, esp, config, battery_interaction, rtc_module)
|
||||
.await?
|
||||
}
|
||||
};
|
||||
.await?;
|
||||
//}
|
||||
//};
|
||||
|
||||
HAL { board_hal }
|
||||
}
|
||||
@@ -566,11 +566,9 @@ impl PlantHal {
|
||||
)
|
||||
.await;
|
||||
HAL {
|
||||
board_hal: initial_hal::create_initial_board(
|
||||
free_pins,
|
||||
PlantControllerConfig::default(),
|
||||
esp,
|
||||
)?,
|
||||
board_hal: v4_hal::create_v4(free_pins, esp, PlantControllerConfig::default(),
|
||||
Box::new(NoBatteryMonitor {}), rtc_module)
|
||||
.await?
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user