Updating minimq/miniconf dependencies

This commit is contained in:
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]] [[package]]
name = "derive_miniconf" name = "derive_miniconf"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/quartiq/miniconf.git?branch=rs/crate-scope-derive#dbd3dfb0ea79b7227c9f217849817601adfa4421"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -401,6 +402,7 @@ dependencies = [
[[package]] [[package]]
name = "miniconf" name = "miniconf"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/quartiq/miniconf.git?branch=rs/crate-scope-derive#dbd3dfb0ea79b7227c9f217849817601adfa4421"
dependencies = [ dependencies = [
"derive_miniconf", "derive_miniconf",
"heapless", "heapless",
@ -412,8 +414,7 @@ dependencies = [
[[package]] [[package]]
name = "minimq" name = "minimq"
version = "0.2.0" version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/quartiq/minimq.git?branch=feature/optional-client-id#18c277088d427a54b8fdb49f2755ffda2479bf3f"
checksum = "9c5e626690b6f62e15710cf9815e5ca25ee54084899298c100a14b2504c80a46"
dependencies = [ dependencies = [
"bit_field", "bit_field",
"embedded-nal", "embedded-nal",

View File

@ -49,7 +49,12 @@ miniconf = "0.1"
generic-array = "0.14" generic-array = "0.14"
[patch.crates-io.miniconf] [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] [patch.crates-io.serde-json-core]
git = "https://github.com/rust-embedded-community/serde-json-core.git" git = "https://github.com/rust-embedded-community/serde-json-core.git"

View File

@ -63,12 +63,8 @@ const APP: () = {
let mqtt_interface = { let mqtt_interface = {
let mqtt_client = { let mqtt_client = {
let broker = IpAddr::V4(Ipv4Addr::new(10, 34, 16, 1)); let broker = IpAddr::V4(Ipv4Addr::new(10, 34, 16, 1));
minimq::MqttClient::new( minimq::MqttClient::new(broker, None, stabilizer.net.stack)
broker, .unwrap()
"stabilizer",
stabilizer.net.stack,
)
.unwrap()
}; };
MqttInterface::new(mqtt_client, "stabilizer", Settings::default()) 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)) response = await interface.command(f'settings/{args.setting}', json.dumps(request))
logger.info(response) logger.info(response)
if args.commit:
response = await interface.command('commit', 'commit')
logger.info(response)
def main(): def main():
""" Main program entry point. """ """ 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('--broker', default='10.34.16.1', type=str, help='The MQTT broker address')
parser.add_argument('values', nargs='+', type=str, parser.add_argument('values', nargs='+', type=str,
help='The value of settings. key=value list or a single value is accepted.') 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') parser.add_argument('-v', '--verbose', action='store_true', help='Enable verbose logging')
args = parser.parse_args() args = parser.parse_args()