warnings to zero :)
This commit is contained in:
@@ -5,11 +5,12 @@ use std::{
|
||||
sync::{atomic::AtomicBool, Arc},
|
||||
};
|
||||
use crate::{
|
||||
espota::OtaUpdate, get_version, log::LogMessage, map_range_moisture, plant_hal::{FileInfo, PLANT_COUNT}, BOARD_ACCESS
|
||||
get_version, log::LogMessage, map_range_moisture, plant_hal::PLANT_COUNT, BOARD_ACCESS
|
||||
};
|
||||
use anyhow::bail;
|
||||
use chrono::DateTime;
|
||||
use esp_idf_sys::{esp_set_time_from_rtc, settimeofday, timeval, vTaskDelay};
|
||||
use esp_idf_sys::{settimeofday, timeval, vTaskDelay};
|
||||
use esp_ota::OtaUpdate;
|
||||
use core::result::Result::Ok;
|
||||
use embedded_svc::http::Method;
|
||||
use esp_idf_hal::delay::Delay;
|
||||
@@ -248,11 +249,10 @@ fn wifi_scan(
|
||||
}
|
||||
|
||||
fn list_files(
|
||||
request: &mut Request<&mut EspHttpConnection>,
|
||||
_request: &mut Request<&mut EspHttpConnection>,
|
||||
) -> Result<Option<std::string::String>, anyhow::Error> {
|
||||
let filename = query_param(request.uri(), "filename").unwrap_or_default();
|
||||
let board = BOARD_ACCESS.lock().unwrap();
|
||||
let result = board.list_files(&filename);
|
||||
let result = board.list_files();
|
||||
let file_list_json = serde_json::to_string(&result)?;
|
||||
return anyhow::Ok(Some(file_list_json));
|
||||
}
|
||||
|
Reference in New Issue
Block a user