fix rollback and windows build

This commit is contained in:
2024-02-21 15:36:26 +01:00
parent 57a0971c4b
commit bfee21796a
5 changed files with 160 additions and 109 deletions

View File

@@ -159,7 +159,6 @@ pub struct PlantCtrlBoard<'a> {
PinDriver<'a, esp_idf_hal::gpio::Gpio22, InputOutput>,
PinDriver<'a, esp_idf_hal::gpio::Gpio19, InputOutput>,
>,
low_voltage_detected: Mutex<bool>,
tank_driver: AdcDriver<'a, esp_idf_hal::adc::ADC1>,
tank_channel: esp_idf_hal::adc::AdcChannelDriver<'a, { attenuation::DB_11 }, Gpio39>,
solar_is_day: PinDriver<'a, esp_idf_hal::gpio::Gpio25, esp_idf_hal::gpio::Input>,
@@ -963,8 +962,6 @@ impl CreatePlantHal<'_> for PlantHal {
let nvs = EspDefaultNvsPartition::take()?;
let wifi_driver = EspWifi::new(peripherals.modem, sys_loop, Some(nvs))?;
let low_voltage_detected = Mutex::new(unsafe { LOW_VOLTAGE_DETECTED });
let adc_config = esp_idf_hal::adc::config::Config {
resolution: esp_idf_hal::adc::config::Resolution::Resolution12Bit,
calibration: true,
@@ -1001,7 +998,6 @@ impl CreatePlantHal<'_> for PlantHal {
}
let rv = Mutex::new(PlantCtrlBoard {
shift_register,
low_voltage_detected,
tank_driver,
tank_channel,
solar_is_day,