startup and ota state detection working, now wifi_ap next
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
use alloc::vec::Vec;
|
||||
use crate::hal::esp::Esp;
|
||||
use crate::hal::rtc::{BackupHeader, RTCModuleInteraction};
|
||||
use alloc::vec::Vec;
|
||||
//use crate::hal::water::TankSensor;
|
||||
use crate::alloc::boxed::Box;
|
||||
use crate::hal::{deep_sleep, BoardInteraction, FreePeripherals, Sensor};
|
||||
use crate::{
|
||||
config::PlantControllerConfig,
|
||||
@@ -10,9 +11,7 @@ use crate::{
|
||||
use anyhow::{bail, Result};
|
||||
use async_trait::async_trait;
|
||||
use chrono::{DateTime, Utc};
|
||||
use embedded_hal::digital::OutputPin;
|
||||
use measurements::{Current, Voltage};
|
||||
use crate::alloc::boxed::Box;
|
||||
|
||||
pub struct Initial<'a> {
|
||||
//pub(crate) general_fault: PinDriver<'a, esp_idf_hal::gpio::AnyIOPin, InputOutput>,
|
||||
@@ -49,7 +48,7 @@ impl RTCModuleInteraction for NoRTC {
|
||||
|
||||
pub(crate) fn create_initial_board(
|
||||
//free_pins: FreePeripherals,
|
||||
fs_mount_error: bool,
|
||||
_fs_mount_error: bool,
|
||||
config: PlantControllerConfig,
|
||||
esp: Esp<'static>,
|
||||
) -> Result<Box<dyn BoardInteraction<'static> + Send>> {
|
||||
@@ -123,7 +122,7 @@ impl<'a> BoardInteraction<'a> for Initial<'a> {
|
||||
bail!("Please configure board revision")
|
||||
}
|
||||
|
||||
async fn general_fault(&mut self, enable: bool) {
|
||||
async fn general_fault(&mut self, _enable: bool) {
|
||||
//let _ = self.general_fault.set_state(enable.into());
|
||||
}
|
||||
|
||||
@@ -134,7 +133,7 @@ impl<'a> BoardInteraction<'a> for Initial<'a> {
|
||||
async fn set_config(&mut self, config: PlantControllerConfig) -> anyhow::Result<()> {
|
||||
self.config = config;
|
||||
//TODO
|
||||
// self.esp.save_config(&self.config)?;
|
||||
// self.esp.save_config(&self.config)?;
|
||||
anyhow::Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user