fixed rust-analyzer trying to check the top workspace without cross-compiling.

This commit is contained in:
Gabe Venberg 2025-07-03 02:22:36 +02:00
parent b894d424aa
commit 6f6660fd6a
3 changed files with 15 additions and 1 deletions

11
.cargo/config.toml Normal file
View file

@ -0,0 +1,11 @@
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "link-arg=-Tdefmt.x",
]
[build]
target = "thumbv7em-none-eabihf"
[env]
DEFMT_LOG = "debug"

3
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,3 @@
{
"rust-analyzer.check.allTargets": false
}

View file

@ -58,7 +58,7 @@ async fn temp_task(mut temp: Temp<'static>) {
let value: u16 = temp.read().await.to_num();
info!("{} C", value);
let delay = Duration::from_millis(delay_ms);
if let Some(v) = SIGNAL.wait().with_timeout(delay).await.ok() {
if let Ok(v) = SIGNAL.wait().with_timeout(delay).await {
delay_ms = match v {
Button::A => max(INTERVAL_MS, delay_ms.saturating_sub(INTERVAL_MS)),
Button::B => delay_ms + INTERVAL_MS,