Commit c756e6ce authored by Cyril Guilloud's avatar Cyril Guilloud
Browse files

Merge branch '2676-musst_reset_cmd' into '1.7.x'

Resolve "add a _reset_cmd() to clear __last_md5 Cache on a RESET"

See merge request !3600

(cherry picked from commit 0c4feb14)

3b0a5089 musst controller: add _reset_cmd to also reset internal __last_md5.value
parent 54b889b3
Pipeline #47504 passed with stages
in 111 minutes and 52 seconds
...@@ -54,6 +54,16 @@ def _clear_cmd(): ...@@ -54,6 +54,16 @@ def _clear_cmd():
return property(exec_cmd, doc="Delete the current program") return property(exec_cmd, doc="Delete the current program")
def _reset_cmd():
def exec_cmd(self):
try:
return self.putget("RESET")
finally:
self._musst__last_md5.value = None
return property(exec_cmd, doc="Musst reset")
def lazy_init(func): def lazy_init(func):
@functools.wraps(func) @functools.wraps(func)
def f(self, *args, **kwargs): def f(self, *args, **kwargs):
...@@ -263,7 +273,7 @@ class musst(CounterContainer): ...@@ -263,7 +273,7 @@ class musst(CounterContainer):
ABORT = _simple_cmd("ABORT", "Program abort") ABORT = _simple_cmd("ABORT", "Program abort")
STOP = _simple_cmd("STOP", "Program stop") STOP = _simple_cmd("STOP", "Program stop")
RESET = _simple_cmd("RESET", "Musst reset") RESET = _reset_cmd()
CONT = _simple_cmd( CONT = _simple_cmd(
"CONT", "Continue the program when stopped in STOP or BREAK states" "CONT", "Continue the program when stopped in STOP or BREAK states"
) )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment