Skip to content

Commit

Permalink
Updating python
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-summers committed Feb 1, 2024
1 parent 0821bb0 commit 17779c2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ byteorder = { version = "1", default-features = false }
smlang = "0.6.0"
enum-iterator = "1.4.0"
idsp = "0.9.2"

# Note: Keep in-sync with `py/setup.py`
miniconf = "0.9"

[profile.dev]
Expand Down
3 changes: 2 additions & 1 deletion py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
license="MIT",
install_requires=[
"stabilizer@git+https://github.com/quartiq/stabilizer@f4055aa#subdirectory=py",
"miniconf-mqtt@git+https://github.com/quartiq/miniconf@8be449d#subdirectory=py/miniconf-mqtt",
# Note: Keep in-sync with `Cargo.toml`
"miniconf-mqtt@git+https://github.com/quartiq/[email protected]#subdirectory=py/miniconf-mqtt",
],
)
12 changes: 6 additions & 6 deletions py/thermostat/configure_output_ch.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def _main():
"--broker",
"-b",
type=str,
default="10.42.0.1",
default="mqtt",
help="The MQTT broker to use to communicate with "
"Thermostat-EEM (%(default)s)",
)
Expand Down Expand Up @@ -152,19 +152,19 @@ async def configure():
interface = await miniconf.Miniconf.create(prefix, args.broker)

# Set the filter coefficients.
await interface.command(
await interface.set(
f"output_channel/{args.channel}/shutdown",
args.shutdown,
)
await interface.command(
await interface.set(
f"output_channel/{args.channel}/hold",
args.hold,
)
await interface.command(
await interface.set(
f"output_channel/{args.channel}/voltage_limit",
args.voltage_limit,
)
await interface.command(
await interface.set(
f"output_channel/{args.channel}/iir",
{
"ba": coefficients,
Expand All @@ -174,7 +174,7 @@ async def configure():
},
)
for i, weight in enumerate(args.input_weights):
await interface.command(
await interface.set(
f"output_channel/{args.channel}/weights/{i}",
weight,
)
Expand Down

0 comments on commit 17779c2

Please sign in to comment.