Skip to content

Commit

Permalink
Add reporting of roll-off error state and allow resetting on error
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Nov 26, 2024
1 parent 56fe22a commit c266fcb
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## Next version

### ✨ Improved

* Add reporting of roll-off error state and allow resetting on error.


## 0.8.4 - November 3, 2024

### ✨ Improved
Expand Down
12 changes: 12 additions & 0 deletions python/lvmecp/actor/commands/dome.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,15 @@ async def stop(command: ECPCommand):
await command.actor.plc.dome.stop()

return command.finish()


@dome.command()
async def reset(command: ECPCommand, force=False):
"""Resets dome error state."""

try:
await command.actor.plc.dome.reset()
except DomeError as err:
return command.fail(err)

return command.finish()
6 changes: 6 additions & 0 deletions python/lvmecp/dome.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,9 @@ async def stop(self):
await self.plc.modbus["drive_enabled"].set(False)

await self.update(use_cache=False)

async def reset(self):
"""Resets the roll-off error state."""

await self.modbus["rolloff_error_reset"].set(1)
await asyncio.sleep(1)
9 changes: 5 additions & 4 deletions python/lvmecp/etc/lvmecp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,14 @@ modbus:
address: 149
mode: holding_register
group: dome
dome_status1:
rolloff_lockout:
address: 410
mode: holding_register
group: dome
dome_status2:
rolloff_error:
address: 411
mode: holding_register
group: dome
rolloff_error_reset:
address: 412
group: dome
oxygen_read_utilities_room:
address: 599
Expand Down

0 comments on commit c266fcb

Please sign in to comment.