For additional reference, the draft copy of code can be found in the follow-up to the original thread: Analyser for quadrature encoder - #23 by BitBob
… which has the first work around commented out (changing self.scaled_position
to ‘0’ (string) when value is 0 (integer)), and the follow-up one implemented (tweaking the 'format'
setting as described above).
Your feedback & comments as to the preferred approach for dealing with this issue are welcome; I’m not sure how many others might have noticed a problem displaying a ‘falsy’ value (like 0) in HLAs – and whether this is something that should be managed natively inside the HLA engine itself vs. handled by each HLA on its own. Also, knowing some more details about the actual template engine / format string specification could help with future HLA developments & customizations (i.e., what’s the syntax specification of the 'format'
string in the result_types for HLA classes?)