feat: add fertilizer pump test functionality with web integration and HAL support
This commit is contained in:
@@ -164,6 +164,7 @@ pub trait BoardInteraction<'a> {
|
||||
async fn get_mptt_voltage(&mut self) -> FatResult<Voltage>;
|
||||
async fn get_mptt_current(&mut self) -> FatResult<Current>;
|
||||
async fn can_power(&mut self, state: bool) -> FatResult<()>;
|
||||
async fn extra2(&mut self, enable: bool) -> FatResult<()>;
|
||||
|
||||
async fn backup_config(&mut self, config: &PlantControllerConfig) -> FatResult<()>;
|
||||
async fn read_backup(&mut self) -> FatResult<PlantControllerConfig>;
|
||||
|
||||
@@ -484,6 +484,15 @@ impl<'a> BoardInteraction<'a> for V4<'a> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn extra2(&mut self, enable: bool) -> FatResult<()> {
|
||||
if enable {
|
||||
self.extra2.set_high();
|
||||
} else {
|
||||
self.extra2.set_low();
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn backup_config(&mut self, controller_config: &PlantControllerConfig) -> FatResult<()> {
|
||||
let mut buffer: [u8; 4096 - BACKUP_HEADER_MAX_SIZE] = [0; 4096 - BACKUP_HEADER_MAX_SIZE];
|
||||
let length = postcard::to_slice(controller_config, &mut buffer)?.len();
|
||||
|
||||
Reference in New Issue
Block a user