Implemented main basically
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-04-14 17:41:48 +02:00
parent f8bd18c307
commit 97986d78e5
8 changed files with 152 additions and 44 deletions

View File

@@ -50,8 +50,14 @@ class ProgramExecutor(Thread):
@property
def state(self):
# Used to check the successfulness of the run as well
return self._state
def stop_looping(self):
if self._loop:
self._logger.info("Looping disabled! Finishing current loop then exiting...")
self._loop = False
def run(self) -> None:
self._state = ProgramExecutorStates.RUNNING
self._logger.info("Start running program")
@@ -61,7 +67,7 @@ class ProgramExecutor(Thread):
for i, step in enumerate(self._program):
self._pc = i
self._current_step_desc = step.describe()
self._logger.debug(f"Executing step {self._pc}")
self._logger.debug(f"Executing step {self._pc:04d}")
try:
step.execute()