Star mask bit flip
In the StarMaskLoop
on devel branch, the bits in ChannelRings
are flipped here when writing to ABCStar MaskInput
registers. An example from StarMaskLoop log:
[12:11:09:691][ debug ][ StarMaskLoop ]: -> Mask stage 0
[12:11:09:691][ debug ][ StarMaskLoop ]: ChannelRings:
Ring content: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.
Ring content: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.
[12:11:09:691][ debug ][ StarMaskLoop ]: Apply masks
[12:11:09:691][ debug ][ StarMaskLoop ]: Apply masks:
write mask: [ 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff]
2nd row: 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1sr row: 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
This was probably done on purpose and for nmask scans, but I found it a bit counterintuitive when adding the mask loop to an analog scan. For example
{
...
"nMaskedStripsPerGroup": 7,
"max": 8,
...
}
with ABCs_TM = 0
actually means for every eight strips, only one of them are actually masked and the other seven will get pulses if they are enabled.
The bits in the masks will always have different/opposite meanings depending on the value of TM
regardless, but I feel it might be less confusing if the meaning of the bits in ChannelRings
are consistent with that in the ABCStar MaskInput
registers. What do you think?