small adjustments
This commit is contained in:
@@ -434,11 +434,12 @@ async fn wifi_scan<T, const N: usize>(
|
||||
) -> Result<Option<String>, anyhow::Error> {
|
||||
let mut board = BOARD_ACCESS.get().await.lock().await;
|
||||
info!("start wifi scan");
|
||||
let scan_result = board.board_hal.get_esp().wifi_scan().await;
|
||||
//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()));
|
||||
//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);
|
||||
anyhow::Ok(Some(ssid_json))
|
||||
@@ -532,7 +533,7 @@ pub async fn httpd(reboot_now: Arc<AtomicBool>, stack: Stack<'static>) {
|
||||
let buffer: TcpBuffers<2, 1024, 1024> = TcpBuffers::new();
|
||||
let tcp = Tcp::new(stack, &buffer);
|
||||
let acceptor = tcp
|
||||
.bind(SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 8080))
|
||||
.bind(SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 80))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user