Skip to content

Commit

Permalink
actually invert (#31)
Browse files Browse the repository at this point in the history
* actually invert

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
untzag and pre-commit-ci[bot] authored Aug 31, 2023
1 parent 0c85729 commit 8a15ee8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions yaqd_mcc/_mcc_ulw_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@ async def _measure(self):
else:
value = ul.a_in_32(0, c.index, ai_range)
voltage = ul.to_eng_units_32(0, ai_range, value)
if c.invert:
voltage *= -1
out[c.name] = voltage
return out
4 changes: 4 additions & 0 deletions yaqd_mcc/mcc-ulw-sensor.avpr
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"config": {
"channels": {
"type": "map",
"values": "channel"
},
"enable": {
"default": true,
"doc": "Disable this daemon. The kind entry-point will not attempt to start this daemon.",
Expand Down
4 changes: 4 additions & 0 deletions yaqd_mcc/mcc-ulw-sensor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ fields = [{"name"="enabled", "type"="boolean", "default"=true},

[config]

[config.channels]
type = "map"
values = "channel"

[state]

[messages]

0 comments on commit 8a15ee8

Please sign in to comment.