mirror of
https://github.com/Djeeberjr/fw-anwesenheit.git
synced 2025-10-13 23:16:37 +00:00
changed NET_STACK_SIZE & WEB_TASK_SIZE
This commit is contained in:
parent
082f1faba9
commit
92c7fec283
@ -6,7 +6,10 @@ use embassy_time::{Duration, Timer};
|
||||
use esp_wifi::wifi::WifiDevice;
|
||||
use static_cell::make_static;
|
||||
|
||||
pub const NETWORK_STACK_SIZE: usize = 5;
|
||||
use crate::webserver::WEB_TAKS_SIZE;
|
||||
|
||||
pub const NETWORK_STACK_SIZE: usize = WEB_TAKS_SIZE + 2; // + 2 for other network taks. Breaks
|
||||
// without
|
||||
|
||||
pub fn setup_network<'a>(seed: u64, wifi: WifiDevice<'static>, spawner: &mut Spawner) -> Stack<'a> {
|
||||
let gw_ip_addr_str = "192.168.2.1";
|
||||
|
@ -8,7 +8,6 @@ use static_cell::make_static;
|
||||
|
||||
use crate::{
|
||||
UsedStore,
|
||||
init::network::NETWORK_STACK_SIZE,
|
||||
webserver::app::{AppProps, AppState},
|
||||
};
|
||||
|
||||
@ -17,6 +16,8 @@ mod assets;
|
||||
mod api;
|
||||
mod app;
|
||||
|
||||
pub const WEB_TAKS_SIZE: usize = 3; // Up this number if request start fail with Timeouts.
|
||||
|
||||
pub fn start_webserver(
|
||||
spawner: &mut Spawner,
|
||||
stack: Stack<'static>,
|
||||
@ -33,12 +34,12 @@ pub fn start_webserver(
|
||||
write: Some(Duration::from_secs(5)),
|
||||
}));
|
||||
|
||||
for task_id in 0..NETWORK_STACK_SIZE {
|
||||
for task_id in 0..WEB_TAKS_SIZE {
|
||||
spawner.must_spawn(webserver_task(task_id, stack, app, config, state));
|
||||
}
|
||||
}
|
||||
|
||||
#[embassy_executor::task(pool_size = NETWORK_STACK_SIZE)]
|
||||
#[embassy_executor::task(pool_size = WEB_TAKS_SIZE)]
|
||||
async fn webserver_task(
|
||||
task_id: usize,
|
||||
stack: embassy_net::Stack<'static>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user