Skip to content

Commit

Permalink
pico feature
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdavidmackenzie committed Aug 19, 2024
1 parent fc73ec4 commit 7a6a7c9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
14 changes: 9 additions & 5 deletions picomon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ version = "0.1.0"
readme = "README.md"
edition = "2021"

[features]
default = ["pico"]
pico = []

[dependencies]
embassy-time = { version = "0.3.0", default-features = false, features = ["defmt", "defmt-timestamp-uptime"] }
embassy-executor = { version = "0.6.0", default-features = false, features = ["task-arena-size-65536", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] }
Expand All @@ -14,19 +18,19 @@ cyw43 = { version = "0.1.0", default-features = false, features = ["defmt"] }
cyw43-pio = { version = "0.1.0", default-features = false, features = ["defmt"] }
panic-probe = { version = "0.3", default-features = false, features = ["print-defmt"] }
portable-atomic = { version = "1.5", default-features = false, features = ["critical-section"] }
defmt = { version = "0.3", default-features = false}
defmt = { version = "0.3", default-features = false }
defmt-rtt = { version = "0.4", default-features = false }
cortex-m-rt = { version = "0.7.0", default-features = false }
static_cell = { version = "2", default-features = false}
static_cell = { version = "2", default-features = false }
log = "0.4"

# To convert device_id into hex for use as a string
faster-hex = { version = "0.9.0", default-features = false }
faster-hex = { version = "0.9.0", default-features = false }

# To make httpclient requests to the server, with TLS
reqwless = { version="0.12.0", default-features = false, features = ["embedded-tls"]}
reqwless = { version = "0.12.0", default-features = false, features = ["embedded-tls"] }
# Needed to workaround an embassy dns server count bug
smoltcp = { version = "0.11.0", default-features = false, features = ["dns-max-server-count-4"]}
smoltcp = { version = "0.11.0", default-features = false, features = ["dns-max-server-count-4"] }

[build-dependencies]
# for reading config from a file in build.rs
Expand Down
1 change: 1 addition & 0 deletions wimon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ path = "src/main.rs"
[features]
default = []
ssids = ["wifiscanner"]
pico = []

[dependencies]
data_model = { path = "../data_model" }
Expand Down
6 changes: 3 additions & 3 deletions wimon/src/lib/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use serde_derive::{Deserialize, Serialize};
use url::Url;

#[cfg_attr(
not(target = "thumbv6m-none-eabi"),
not(feature = "pico"),
derive(Default, Serialize, Deserialize, Debug, PartialEq)
)]
pub enum MonitorSpec {
Expand All @@ -18,7 +18,7 @@ pub enum MonitorSpec {
}

#[cfg_attr(
not(target = "thumbv6m-none-eabi"),
not(feature = "pico"),
derive(Serialize, Deserialize, Debug, PartialEq)
)]
pub struct ReportSpec {
Expand All @@ -27,7 +27,7 @@ pub struct ReportSpec {
}

#[cfg_attr(
not(target = "thumbv6m-none-eabi"),
not(feature = "pico"),
derive(Default, Serialize, Deserialize)
)]
pub struct Config {
Expand Down

0 comments on commit 7a6a7c9

Please sign in to comment.