Updating minimq/miniconf dependencies

master
Ryan Summers 2021-03-02 16:43:19 +01:00
parent 7e959d4828
commit c2b00db9e9
4 changed files with 11 additions and 15 deletions

5
Cargo.lock generated
View File

@ -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",

View File

@ -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"

View File

@ -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())

View File

@ -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()