refactor: move PumpInfo struct to mqtt module
This commit is contained in:
@@ -115,19 +115,6 @@ struct LightState {
|
||||
is_day: bool,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq, Default)]
|
||||
///mqtt struct to track pump activities
|
||||
struct PumpInfo {
|
||||
enabled: bool,
|
||||
pump_ineffective: bool,
|
||||
median_current_ma: u16,
|
||||
max_current_ma: u16,
|
||||
min_current_ma: u16,
|
||||
error: String,
|
||||
flow_raw: u32,
|
||||
flow_ml: f32,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct PumpResult {
|
||||
median_current_ma: u16,
|
||||
@@ -1033,7 +1020,7 @@ async fn pump_info(
|
||||
flow_raw: u32,
|
||||
flow_ml: f32,
|
||||
) {
|
||||
let pump_info = PumpInfo {
|
||||
let pump_info = mqtt::PumpInfo {
|
||||
enabled: pump_active,
|
||||
pump_ineffective,
|
||||
median_current_ma,
|
||||
|
||||
Reference in New Issue
Block a user