Adjust timeouts and constants for improved moisture sensor and backup management accuracy

- Increased CAN measurement timeout to 5000ms for reliability.
- Updated `SAVEGAME_SLOT_SIZE` usage in backup handling for consistency.
- Refined moisture sensor frequency thresholds for better sensor calibration (400Hz-70kHz).
This commit is contained in:
2026-05-03 21:03:13 +02:00
parent 4771a77686
commit 0ed9d6bb57
4 changed files with 7 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
use crate::fat_error::{FatError, FatResult};
use crate::hal::savegame_manager::SAVEGAME_SLOT_SIZE;
use crate::webserver::read_up_to_bytes_from_request;
use crate::BOARD_ACCESS;
use alloc::borrow::ToOwned;
@@ -46,7 +47,7 @@ pub(crate) async fn backup_config<T, const N: usize>(
where
T: Read + Write,
{
let input = read_up_to_bytes_from_request(conn, Some(4096)).await?;
let input = read_up_to_bytes_from_request(conn, Some(SAVEGAME_SLOT_SIZE)).await?;
info!("Read input with length {}", input.len());
let mut board = BOARD_ACCESS.get().await.lock().await;
let config_to_backup = serde_json::from_slice(&input)?;