From c2b00db9e96ab6a7d59edf072718d92b23ea15dd Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Tue, 2 Mar 2021 16:43:19 +0100 Subject: [PATCH] Updating minimq/miniconf dependencies --- Cargo.lock | 5 +++-- Cargo.toml | 7 ++++++- src/bin/dual-iir.rs | 8 ++------ stabilizer.py | 6 ------ 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b0cb459..47be14a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -201,6 +201,7 @@ dependencies = [ [[package]] name = "derive_miniconf" version = "0.1.0" +source = "git+https://github.com/quartiq/miniconf.git?branch=rs/crate-scope-derive#dbd3dfb0ea79b7227c9f217849817601adfa4421" dependencies = [ "proc-macro2", "quote", @@ -401,6 +402,7 @@ dependencies = [ [[package]] name = "miniconf" version = "0.1.0" +source = "git+https://github.com/quartiq/miniconf.git?branch=rs/crate-scope-derive#dbd3dfb0ea79b7227c9f217849817601adfa4421" dependencies = [ "derive_miniconf", "heapless", @@ -412,8 +414,7 @@ dependencies = [ [[package]] name = "minimq" version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c5e626690b6f62e15710cf9815e5ca25ee54084899298c100a14b2504c80a46" +source = "git+https://github.com/quartiq/minimq.git?branch=feature/optional-client-id#18c277088d427a54b8fdb49f2755ffda2479bf3f" dependencies = [ "bit_field", "embedded-nal", diff --git a/Cargo.toml b/Cargo.toml index 4160253..340f275 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,7 +49,12 @@ miniconf = "0.1" generic-array = "0.14" [patch.crates-io.miniconf] -path = "../miniconf/" +git = "https://github.com/quartiq/miniconf.git" +branch = "rs/crate-scope-derive" + +[patch.crates-io.minimq] +git = "https://github.com/quartiq/minimq.git" +branch = "feature/optional-client-id" [patch.crates-io.serde-json-core] git = "https://github.com/rust-embedded-community/serde-json-core.git" diff --git a/src/bin/dual-iir.rs b/src/bin/dual-iir.rs index 9b6b24f..97ea9b3 100644 --- a/src/bin/dual-iir.rs +++ b/src/bin/dual-iir.rs @@ -63,12 +63,8 @@ const APP: () = { let mqtt_interface = { let mqtt_client = { let broker = IpAddr::V4(Ipv4Addr::new(10, 34, 16, 1)); - minimq::MqttClient::new( - broker, - "stabilizer", - stabilizer.net.stack, - ) - .unwrap() + minimq::MqttClient::new(broker, None, stabilizer.net.stack) + .unwrap() }; MqttInterface::new(mqtt_client, "stabilizer", Settings::default()) diff --git a/stabilizer.py b/stabilizer.py index 973a7d1..f302067 100644 --- a/stabilizer.py +++ b/stabilizer.py @@ -108,10 +108,6 @@ async def configure_settings(args): response = await interface.command(f'settings/{args.setting}', json.dumps(request)) logger.info(response) - if args.commit: - response = await interface.command('commit', 'commit') - logger.info(response) - def main(): """ Main program entry point. """ @@ -122,8 +118,6 @@ def main(): parser.add_argument('--broker', default='10.34.16.1', type=str, help='The MQTT broker address') parser.add_argument('values', nargs='+', type=str, help='The value of settings. key=value list or a single value is accepted.') - parser.add_argument('--commit', action='store_true', - help='Specified true to commit after updating settings.') parser.add_argument('-v', '--verbose', action='store_true', help='Enable verbose logging') args = parser.parse_args()