Adding working example

master
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",
]
[[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]]
name = "dsp"
version = "0.1.0"
dependencies = [
"criterion",
"libm",
"miniconf 0.1.0 (git+https://github.com/vertigo-designs/miniconf.git?branch=feature/mqtt-interface)",
"ndarray",
"rand",
"serde",
@ -630,19 +619,7 @@ dependencies = [
name = "miniconf"
version = "0.1.0"
dependencies = [
"derive_stringset 0.1.0",
"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)",
"derive_stringset",
"heapless",
"minimq",
"serde",
@ -1074,7 +1051,7 @@ dependencies = [
"heapless",
"log",
"mcp23017",
"miniconf 0.1.0",
"miniconf",
"nb 1.0.0",
"panic-halt",
"panic-semihosting",

View File

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

View File

@ -9,10 +9,6 @@ libm = "0.2.1"
serde = { version = "1.0", features = ["derive"], default-features = false }
serde-json-core = "0.1"
[dependencies.miniconf]
git = "https://github.com/vertigo-designs/miniconf.git"
branch = "feature/mqtt-interface"
[dev-dependencies]
criterion = "0.3"
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)]
const APP: () = {
struct Resources {
@ -63,7 +61,7 @@ const APP: () = {
let broker = IpAddr::V4(Ipv4Addr::new(10, 34, 16, 1));
let mqtt_interface = MqttInterface::new(
stabilizer.net.stack,
ID,
"stabilizer",
broker,
Settings::new(),
)