Adding working example

This commit is contained in:
Ryan Summers 2021-02-03 19:55:58 +01:00
parent 738516eedb
commit 91f16c2961
4 changed files with 6 additions and 36 deletions

27
Cargo.lock generated
View File

@ -357,23 +357,12 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "derive_stringset"
version = "0.1.0"
source = "git+https://github.com/vertigo-designs/miniconf.git?branch=feature/mqtt-interface#38379f7fa72e675c348a4f532811795cc95766df"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "dsp" name = "dsp"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"criterion", "criterion",
"libm", "libm",
"miniconf 0.1.0 (git+https://github.com/vertigo-designs/miniconf.git?branch=feature/mqtt-interface)",
"ndarray", "ndarray",
"rand", "rand",
"serde", "serde",
@ -630,19 +619,7 @@ dependencies = [
name = "miniconf" name = "miniconf"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"derive_stringset 0.1.0", "derive_stringset",
"heapless",
"minimq",
"serde",
"serde-json-core 0.2.0",
]
[[package]]
name = "miniconf"
version = "0.1.0"
source = "git+https://github.com/vertigo-designs/miniconf.git?branch=feature/mqtt-interface#38379f7fa72e675c348a4f532811795cc95766df"
dependencies = [
"derive_stringset 0.1.0 (git+https://github.com/vertigo-designs/miniconf.git?branch=feature/mqtt-interface)",
"heapless", "heapless",
"minimq", "minimq",
"serde", "serde",
@ -1074,7 +1051,7 @@ dependencies = [
"heapless", "heapless",
"log", "log",
"mcp23017", "mcp23017",
"miniconf 0.1.0", "miniconf",
"nb 1.0.0", "nb 1.0.0",
"panic-halt", "panic-halt",
"panic-semihosting", "panic-semihosting",

View File

@ -46,9 +46,8 @@ dsp = { path = "dsp" }
ad9959 = { path = "ad9959" } ad9959 = { path = "ad9959" }
[dependencies.miniconf] [dependencies.miniconf]
# git = "https://github.com/vertigo-designs/miniconf.git" git = "https://github.com/vertigo-designs/miniconf.git"
# branch = "feature/mqtt-interface" branch = "feature/mqtt-interface"
path = "../../vertigo-designs/miniconf"
[dependencies.mcp23017] [dependencies.mcp23017]
git = "https://github.com/mrd0ll4r/mcp23017.git" git = "https://github.com/mrd0ll4r/mcp23017.git"
@ -71,7 +70,7 @@ pounder_v1_1 = [ ]
[profile.dev] [profile.dev]
codegen-units = 1 codegen-units = 1
incremental = false incremental = false
opt-level = 1 opt-level = 3
[profile.release] [profile.release]
opt-level = 3 opt-level = 3

View File

@ -9,10 +9,6 @@ libm = "0.2.1"
serde = { version = "1.0", features = ["derive"], default-features = false } serde = { version = "1.0", features = ["derive"], default-features = false }
serde-json-core = "0.1" serde-json-core = "0.1"
[dependencies.miniconf]
git = "https://github.com/vertigo-designs/miniconf.git"
branch = "feature/mqtt-interface"
[dev-dependencies] [dev-dependencies]
criterion = "0.3" criterion = "0.3"
rand = "0.8" rand = "0.8"

View File

@ -38,8 +38,6 @@ impl Settings {
} }
} }
const ID: &str = "test";
#[rtic::app(device = stm32h7xx_hal::stm32, peripherals = true, monotonic = rtic::cyccnt::CYCCNT)] #[rtic::app(device = stm32h7xx_hal::stm32, peripherals = true, monotonic = rtic::cyccnt::CYCCNT)]
const APP: () = { const APP: () = {
struct Resources { struct Resources {
@ -63,7 +61,7 @@ const APP: () = {
let broker = IpAddr::V4(Ipv4Addr::new(10, 34, 16, 1)); let broker = IpAddr::V4(Ipv4Addr::new(10, 34, 16, 1));
let mqtt_interface = MqttInterface::new( let mqtt_interface = MqttInterface::new(
stabilizer.net.stack, stabilizer.net.stack,
ID, "stabilizer",
broker, broker,
Settings::new(), Settings::new(),
) )