Skip to content
Snippets Groups Projects
Commit 08357ae7 authored by Björn Senfftleben's avatar Björn Senfftleben
Browse files

change state workflow / behaviour

parent 8b23c33b
No related branches found
No related tags found
No related merge requests found
......@@ -196,12 +196,13 @@ class Tempus(Device):
description="Reset fast-links. This will take about 30 s.",
allowedStates={State.ON, State.ACTIVE})
async def resetFastLinks(self):
initial_state = self.State
self.state = State.CHANGING
self.commandLog = (
"#### Resetting fast-links ####\nThis will take about 30 s.")
self.background_task = background(self._reset_fast_links())
self.background_task = background(self._reset_fast_links(initial_state))
async def _reset_fast_links(self):
async def _reset_fast_links(self, initial_state):
try:
await self.send_command(
f"os.system('{self.APP_DIR}/sc_set_gwt_link_up.py -i 0x0 "
......@@ -211,7 +212,7 @@ class Tempus(Device):
"-l 0x0 -s 0x2')", sleep_time=15)
self.status = "Fast-links reset done"
self.state = State.INIT
self.state = initial_state
except Exception as e:
self.handle_execption(e)
......@@ -220,7 +221,7 @@ class Tempus(Device):
displayedName="Configure",
description="Run the configuration sequence. This will take about "
"30 s.",
allowedStates={State.ON})
allowedStates={State.ON, State.ACTIVE})
async def configure(self):
self.state = State.CHANGING
self.status = "Configuring TEMPUS"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment