pcdshub / pytmc

Generate EPICS IOCs and records from TwinCAT projects - along with many TwinCAT project tools
https://pcdshub.github.io/pytmc/
Other
10 stars 11 forks source link

FIX: macro sub in st.cmd motor records #310

Closed ZLLentz closed 1 year ago

ZLLentz commented 1 year ago

Previously, the @ macro substitution machinery did not run for the st.cmd motor records. This PR removes the duplicated logic and paths us through the same record generation code used for general-purpose db files. This fixes the aforementioned issue.

See https://github.com/pcdshub/lcls-plc-example-motion/pull/10/commits/15bc045b52321a7968d50101f573b8d4a7148177 for mild proof that this works. I've conflated the fix here with some unrelated edits to make my pvnames shorter (they were too long) and edits I made to add parentheses in my substitution lines, but you can see the @ symbol turning into a $

I've also added a unit test.