probalby found most of the import related stuff, now the real refactor begins
This commit is contained in:
@@ -17,6 +17,7 @@ use crate::{
|
||||
},
|
||||
log::{log, LogMessage},
|
||||
};
|
||||
use alloc::boxed::Box;
|
||||
use anyhow::{Ok, Result};
|
||||
use battery::BQ34Z100G1;
|
||||
use bq34z100::Bq34z100g1Driver;
|
||||
@@ -45,18 +46,16 @@ use esp_idf_sys::{
|
||||
};
|
||||
use esp_ota::mark_app_valid;
|
||||
use measurements::{Current, Voltage};
|
||||
use once_cell::sync::Lazy;
|
||||
use std::result::Result::Ok as OkStd;
|
||||
use std::sync::Mutex;
|
||||
use std::time::Duration;
|
||||
use embassy_sync::{Mutex, LazyLock};
|
||||
use esp_idf_hal::can::CAN;
|
||||
use crate::alloc::string::ToString;
|
||||
|
||||
//Only support for 8 right now!
|
||||
pub const PLANT_COUNT: usize = 8;
|
||||
|
||||
const TANK_MULTI_SAMPLE: usize = 11;
|
||||
|
||||
pub static I2C_DRIVER: Lazy<Mutex<I2cDriver<'static>>> = Lazy::new(PlantHal::create_i2c);
|
||||
pub static I2C_DRIVER: LazyLock<Mutex<I2cDriver<'static>>> = LazyLock::new(PlantHal::create_i2c);
|
||||
|
||||
fn deep_sleep(duration_in_ms: u64) -> ! {
|
||||
unsafe {
|
||||
|
||||
Reference in New Issue
Block a user