Machinekit

Machinekit

Machinekit Documentation

HAL Component — KNOB2FLOAT

INSTANTIABLE COMPONENTS — General

All instantiable components can be loaded in two manners

Using loadrt with or without count= | names= parameters as per legacy components
Using newinst, which names the instance and allows further parameters and arguments
primarily pincount= which can set the number of pins created for that instance (where applicable)

NAME

knob2float — Convert counts (probably from an encoder) to a float value

SYNOPSIS

knob2float

USAGE SYNOPSIS

loadrt knob2float
OR
newinst knob2float <newinstname> [ pincount=N | iprefix=prefix ] [instanceparamX=X | argX=X ]

( args in [ ] denote possible args and parameters, may not be used in all components )

FUNCTIONS

knob2float.N.funct ( OR <newinstname>.funct (requires a floating-point thread) )

PINS

knob2float.N.counts s32 in ( OR <newinstname>.counts s32 in ) - Counts

knob2float.N.enable bit in ( OR <newinstname>.enable bit in ) - When TRUE, output is controlled by count, when FALSE, output is fixed

knob2float.N.scale float in ( OR <newinstname>.scale float in ) - Amount of output change per count

knob2float.N.out float out ( OR <newinstname>.out float out ) - Output value

knob2float.N.max-out float io (default: 1.0) ( OR <newinstname>.max-out float io (default: 1.0) ) - Maximum output value, further increases in count will be ignored

knob2float.N.min-out float io (default: 0.0) ( OR <newinstname>.min-out float io (default: 0.0) ) - Minimum output value, further decreases in count will be ignored

LICENCE

GPL