From 1aeba1d5c5ffc3a9762950847a617e2e3ba21453 Mon Sep 17 00:00:00 2001 From: Anders Blomdell <anders.blomdell@control.lth.se> Date: Mon, 11 May 2020 18:47:05 +0200 Subject: [PATCH] Add rule for empty AUTO programs --- robotlab_safety/pluto_auto.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/robotlab_safety/pluto_auto.py b/robotlab_safety/pluto_auto.py index 1c509d0..8625d43 100755 --- a/robotlab_safety/pluto_auto.py +++ b/robotlab_safety/pluto_auto.py @@ -31,7 +31,9 @@ class PlutoVariables: rh.append(expr.format(*matches, pluto=v[0])) pass pass - if op == 'AND': + if len(rh) == 0: + return("%s=0" % (lh)) + elif op == 'AND': return("%s=%s" % (lh, '*'.join(rh))) elif op == 'OR': return("%s=%s" % (lh, '+'.join(rh))) -- GitLab