mqtt via mcutie
This commit is contained in:
@@ -2,10 +2,10 @@ use crate::bail;
|
||||
use crate::fat_error::FatError;
|
||||
use crate::hal::esp::{hold_disable, hold_enable};
|
||||
use crate::hal::rtc::RTCModuleInteraction;
|
||||
use crate::hal::v3_shift_register::ShiftRegister40;
|
||||
use crate::hal::water::TankSensor;
|
||||
use crate::hal::{BoardInteraction, FreePeripherals, Sensor, PLANT_COUNT, TIME_ACCESS};
|
||||
use crate::log::{LogMessage, LOG_ACCESS};
|
||||
use crate::sipo::ShiftRegister40;
|
||||
use crate::{
|
||||
config::PlantControllerConfig,
|
||||
hal::{battery::BatteryInteraction, esp::Esp},
|
||||
@@ -15,7 +15,6 @@ use alloc::format;
|
||||
use alloc::string::ToString;
|
||||
use async_trait::async_trait;
|
||||
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
|
||||
use embassy_sync::blocking_mutex::CriticalSectionMutex;
|
||||
use embassy_sync::mutex::Mutex;
|
||||
use embassy_time::Timer;
|
||||
use embedded_hal::digital::OutputPin as _;
|
||||
@@ -267,7 +266,7 @@ impl<'a> BoardInteraction<'a> for V3<'a> {
|
||||
//self.signal_counter.counter_clear()?;
|
||||
//Disable all
|
||||
{
|
||||
let mut shift_register = self.shift_register.lock().await;
|
||||
let shift_register = self.shift_register.lock().await;
|
||||
shift_register.decompose()[MS_4].set_high()?;
|
||||
}
|
||||
|
||||
@@ -298,7 +297,7 @@ impl<'a> BoardInteraction<'a> for V3<'a> {
|
||||
|
||||
let is_bit_set = |b: u8| -> bool { sensor_channel & (1 << b) != 0 };
|
||||
{
|
||||
let mut shift_register = self.shift_register.lock().await;
|
||||
let shift_register = self.shift_register.lock().await;
|
||||
let pin_0 = &mut shift_register.decompose()[MS_0];
|
||||
let pin_1 = &mut shift_register.decompose()[MS_1];
|
||||
let pin_2 = &mut shift_register.decompose()[MS_2];
|
||||
@@ -336,7 +335,7 @@ impl<'a> BoardInteraction<'a> for V3<'a> {
|
||||
Timer::after_millis(measurement).await;
|
||||
//self.signal_counter.counter_pause()?;
|
||||
{
|
||||
let mut shift_register = self.shift_register.lock().await;
|
||||
let shift_register = self.shift_register.lock().await;
|
||||
shift_register.decompose()[MS_4].set_high()?;
|
||||
shift_register.decompose()[SENSOR_ON].set_low()?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user