Skip to content

Commit

Permalink
Merge pull request #878 from quartiq/miniconf-rev
Browse files Browse the repository at this point in the history
fix miniconf rev
  • Loading branch information
jordens authored Apr 15, 2024
2 parents a9d904d + c7ee783 commit 2467241
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@ rev = "ccff77578925942e40e0a2c7b6d397ad164fdedb"

[patch.crates-io.miniconf]
git = "https://github.com/quartiq/miniconf"
rev = "15c2bb9"

[patch.crates-io.miniconf_mqtt]
git = "https://github.com/quartiq/miniconf"
rev = "15c2bb9"

[features]
nightly = []
Expand Down
6 changes: 3 additions & 3 deletions hitl/loopback.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,17 @@ async def test():
""" The actual testing being completed. """
prefix = args.prefix
if not args.prefix:
devices = await miniconf.discover(args.broker, 'dt/sinara/dual-iir/+', 1)
devices = await miniconf.discover(args.broker, 'dt/sinara/dual-iir/+')
if not devices:
raise Exception('No Stabilizer (Dual-iir) devices found')
assert len(devices) == 1, \
f'Multiple Stabilizers found: {devices}. Please specify one with --prefix'

prefix = devices.pop()

tele = await Telemetry.create(prefix, args.broker)
tele = await Telemetry.create(args.broker, prefix)

stabilizer = await miniconf.Miniconf.create(prefix, args.broker)
stabilizer = await miniconf.Miniconf.create(args.broker, prefix)

# Disable IIR holds and configure the telemetry rate.
await stabilizer.set('/allow_hold', False)
Expand Down
4 changes: 2 additions & 2 deletions hitl/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async def _main():

prefix = args.prefix
if not args.prefix:
devices = await miniconf.discover(args.broker, 'dt/sinara/dual-iir/+', 1)
devices = await miniconf.discover(args.broker, 'dt/sinara/dual-iir/+')
if not devices:
raise Exception('No Stabilizer (Dual-iir) devices found')
assert len(devices) == 1, \
Expand All @@ -40,7 +40,7 @@ async def _main():

logging.basicConfig(level=logging.INFO)

conf = await miniconf.Miniconf.create(prefix, args.broker)
conf = await miniconf.Miniconf.create(args.broker, prefix)

stream_target = [int(x) for x in args.ip.split('.')]
if ipaddress.ip_address(args.ip).is_unspecified:
Expand Down
2 changes: 1 addition & 1 deletion py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"matplotlib",
"gmqtt",
# Keep this synced with the miniconf version in Cargo.toml
"miniconf-mqtt@git+https://github.com/quartiq/miniconf@v0.9.0#subdirectory=py/miniconf-mqtt",
"miniconf-mqtt@git+https://github.com/quartiq/miniconf@15c2bb9#subdirectory=py/miniconf-mqtt",
],
)
2 changes: 1 addition & 1 deletion py/stabilizer/iir_coefficients.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def _main():

async def configure():
logger.info("Connecting to broker")
interface = await miniconf.Miniconf.create(prefix, args.broker)
interface = await miniconf.Miniconf.create(args.broker, prefix)

# Set the filter coefficients.
# Note: In the future, we will need to Handle higher-order cascades.
Expand Down
2 changes: 1 addition & 1 deletion py/stabilizer/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Telemetry:
When the queue is full the oldest messages will be dropped.
"""
@classmethod
async def create(cls, prefix, broker, maxsize=1):
async def create(cls, broker, prefix, maxsize=1):
"""
Connect to the MQTT broker at `broker` and start listening for Stabilizer
telemetry messages under the prefix `prefix`.
Expand Down

0 comments on commit 2467241

Please sign in to comment.