Skip to content

bug? medm converter does not convert a boolean expression correctly.. #3016

Description

@cpchuang

There might be a bug in .adl file converter...

This part of code
https://github.com/epics-modules/motor/blob/master/motorApp/op/adl/motorx.adl

                calc="A!=0||B==7"
		chan="$(P)$(M).SET"
		chanB="$(P)$(M).STAT"

got converted to
https://github.com/epics-modules/motor/blob/master/motorApp/op/bob/autoconvert/motorx.bob

      <rule name="vis_calc" prop_id="visible" out_exp="false">
        <exp bool_exp="!(pv0!==0||pv1==7)">
          <value>false</value>
        </exp>
        <pv_name>$(P)$(M).SET</pv_name>
        <pv_name>$(P)$(M).STAT</pv_name>

and cause syntax error

java.lang.Exception: Cannot compile rule: rectangle:rectangle #40:vis_calc.rule.py
.
.
Caused by: SyntaxError: ("no viable alternative at input '=='", ('rectangle:rectangle #40:vis_calc.rule.py', 27, 18, '    if  not (pv0!===0 or pv1==7):\n'))

should be "pv0!=0", not "pv0!==0".

Many display in motor module got affected.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions