refactor: move PumpInfo struct to mqtt module
This commit is contained in:
@@ -100,16 +100,6 @@ impl WaitType {
|
||||
}
|
||||
}
|
||||
|
||||
#[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,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct PumpResult {
|
||||
median_current_ma: u16,
|
||||
@@ -848,7 +838,7 @@ async fn pump_info(
|
||||
min_current_ma: u16,
|
||||
_error: bool,
|
||||
) {
|
||||
let pump_info = PumpInfo {
|
||||
let pump_info = mqtt::PumpInfo {
|
||||
enabled: pump_active,
|
||||
pump_ineffective,
|
||||
median_current_ma,
|
||||
|
||||
Reference in New Issue
Block a user