clippy
This commit is contained in:
		| @@ -7,7 +7,7 @@ use anyhow::Result; | |||||||
| use chrono::{Datelike, Duration, NaiveDateTime, Timelike}; | use chrono::{Datelike, Duration, NaiveDateTime, Timelike}; | ||||||
| use chrono_tz::Europe::Berlin; | use chrono_tz::Europe::Berlin; | ||||||
| use esp_idf_hal::delay::Delay; | use esp_idf_hal::delay::Delay; | ||||||
| use esp_idf_sys::{esp_restart, uxTaskGetStackHighWaterMark, vTaskDelay}; | use esp_idf_sys::{esp_restart, vTaskDelay}; | ||||||
| use esp_ota::rollback_and_reboot; | use esp_ota::rollback_and_reboot; | ||||||
| use log::error; | use log::error; | ||||||
| use once_cell::sync::Lazy; | use once_cell::sync::Lazy; | ||||||
| @@ -182,7 +182,7 @@ fn main() -> Result<()> { | |||||||
|     if board.is_config_reset() { |     if board.is_config_reset() { | ||||||
|         board.general_fault(true); |         board.general_fault(true); | ||||||
|         println!("Reset config is pressed, waiting 5s"); |         println!("Reset config is pressed, waiting 5s"); | ||||||
|         for i in 0..25 { |         for _i in 0..25 { | ||||||
|             board.general_fault(true); |             board.general_fault(true); | ||||||
|             Delay::new_default().delay_ms(50); |             Delay::new_default().delay_ms(50); | ||||||
|             board.general_fault(false); |             board.general_fault(false); | ||||||
| @@ -385,7 +385,7 @@ fn main() -> Result<()> { | |||||||
|         //TODO update mqtt state here! |         //TODO update mqtt state here! | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     if (STAY_ALIVE.load(std::sync::atomic::Ordering::Relaxed)) { |     if STAY_ALIVE.load(std::sync::atomic::Ordering::Relaxed) { | ||||||
|         drop(board); |         drop(board); | ||||||
|         let reboot_now = Arc::new(AtomicBool::new(false)); |         let reboot_now = Arc::new(AtomicBool::new(false)); | ||||||
|         let _webserver = httpd(reboot_now.clone()); |         let _webserver = httpd(reboot_now.clone()); | ||||||
| @@ -394,7 +394,7 @@ fn main() -> Result<()> { | |||||||
|  |  | ||||||
|     'eachplant: for plant in 0..PLANT_COUNT { |     'eachplant: for plant in 0..PLANT_COUNT { | ||||||
|         let mut state = plantstate[plant]; |         let mut state = plantstate[plant]; | ||||||
|         if (state.dry && !state.cooldown) { |         if state.dry && !state.cooldown { | ||||||
|             println!("Trying to pump with pump {} now", plant); |             println!("Trying to pump with pump {} now", plant); | ||||||
|             let plant_config = config.plants[plant]; |             let plant_config = config.plants[plant]; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -196,7 +196,7 @@ pub struct PlantCtrlBoard<'a> { | |||||||
|  |  | ||||||
| impl PlantCtrlBoardInteraction for PlantCtrlBoard<'_> { | impl PlantCtrlBoardInteraction for PlantCtrlBoard<'_> { | ||||||
|     fn battery_state(&mut self) -> Result<BatteryState> { |     fn battery_state(&mut self) -> Result<BatteryState> { | ||||||
|         return Ok(BatteryState::default()); |         Ok(BatteryState::default()) | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     fn is_day(&self) -> bool { |     fn is_day(&self) -> bool { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user