Skip to content

Commit

Permalink
Merge branch 'lookuptable' of github.com:paulscherrerinstitute/ecmccfg
Browse files Browse the repository at this point in the history
  • Loading branch information
anderssandstrom committed Dec 11, 2024
2 parents 307d080 + 455ac1f commit 063f23c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scripts/jinja2/ecmcYamlSchema.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ def get_schema(self, keys):
'type': 'dict',
'schema': {
'filename': {'required': True, 'type': 'string'},
'mask': {'type': 'string'},
'enable': {'type': 'integer'},
'range': {'type': 'float'},
'enable': {'type': 'boolean'},
}
},
'unit': {'type': 'string'},
Expand Down
6 changes: 3 additions & 3 deletions scripts/jinja2/templates/encoder.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ ecmcConfigOrDie "Cfg.SetAxisEncOffset(${ECMC_AXIS_NO},{{ encoder.absOffset }})"

{%- if encoder.lookuptable is defined %}
ecmcConfigOrDie "Cfg.LoadAxisEncLookupTable(${ECMC_AXIS_NO},{{ encoder.lookuptable.filename }})"
{%- if encoder.lookuptable.mask is defined %}
ecmcConfigOrDie "Cfg.SetAxisEncLookupTableRawPosMask(${ECMC_AXIS_NO},{{ encoder.lookuptable.mask }})"
{%- if encoder.lookuptable.range is defined %}
ecmcConfigOrDie "Cfg.SetAxisEncLookupTableRange(${ECMC_AXIS_NO},{{ encoder.lookuptable.range }})"
{%- endif %}

{%- if encoder.lookuptable.enable is defined %}
ecmcConfigOrDie "Cfg.SetAxisEncLookupTableEnable(${ECMC_AXIS_NO},{{ encoder.lookuptable.enable }})"
ecmcConfigOrDie "Cfg.SetAxisEncLookupTableEnable(${ECMC_AXIS_NO},{{ encoder.lookuptable.enable|int }})"
{%- endif %}
{%- endif %}

0 comments on commit 063f23c

Please sign in to comment.