nthallen / monarch

Monarch Data Acquisition System
0 stars 1 forks source link

swscomp issue with more than one variable using SWS_ values #185

Closed nthallen closed 1 year ago

nthallen commented 1 year ago

The second variable does not get a ": Set %d { $0 = $2; }" command added. That command is invoked in the "reset_it" case.

Of course is my case, I don't want the variable to be reset automatically, so will probably add "reset_it = 0;" to every case, but right now it won't compile.

It looks like $tma_output is set in all cases, but it is only cleared if $opts{A}. Clearing it fixes half my problem.

The remaining issue is that I want an SWS_ memonic to be defined for 0, but this produces a duplicate case value because of the 'case 0:' in tma_prolog(). I think this can be resolved by moving 'case 0' to tma_epilog() and suppressing it if one of the mnemonics has a zero value.

nthallen commented 1 year ago

How about if definition of SWM constants differed from SWS constants in not generating .tma code?