tanksensor and rtc sync
This commit is contained in:
@@ -4,7 +4,7 @@ use crate::config::PlantControllerConfig;
|
||||
use crate::hal::rtc::X25;
|
||||
use crate::hal::{esp_set_time, esp_time};
|
||||
use crate::log::LOG_ACCESS;
|
||||
use crate::tank::{determine_tank_state, TankInfo};
|
||||
use crate::tank::determine_tank_state;
|
||||
use crate::FatError::{FatError, FatResult};
|
||||
use crate::{bail, get_version, log::LogMessage, BOARD_ACCESS};
|
||||
use alloc::borrow::ToOwned;
|
||||
@@ -385,7 +385,7 @@ impl Handler for HttpHandler {
|
||||
Some(200)
|
||||
}
|
||||
"/log" => {
|
||||
let buf = get_log(conn).await;
|
||||
get_log(conn).await?;
|
||||
Some(200)
|
||||
}
|
||||
"/get_backup_config" => {
|
||||
@@ -688,12 +688,11 @@ async fn wifi_scan<T, const N: usize>(
|
||||
) -> FatResult<Option<String>> {
|
||||
let mut board = BOARD_ACCESS.get().await.lock().await;
|
||||
info!("start wifi scan");
|
||||
//let scan_result = board.board_hal.get_esp().wifi_scan().await?
|
||||
//FIXME currently panics
|
||||
let mut ssids: Vec<String> = Vec::new();
|
||||
//scan_result
|
||||
//.iter()
|
||||
//.for_each(|s| ssids.push(s.ssid.to_string()));
|
||||
let scan_result = board.board_hal.get_esp().wifi_scan().await?;
|
||||
scan_result
|
||||
.iter()
|
||||
.for_each(|s| ssids.push(s.ssid.to_string()));
|
||||
let ssid_json = serde_json::to_string(&SSIDList { ssids })?;
|
||||
info!("Sending ssid list {}", &ssid_json);
|
||||
Ok(Some(ssid_json))
|
||||
|
||||
Reference in New Issue
Block a user