Machinekit

Machinekit

Machinekit Documentation

HAL Component — NEAR

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

near — Determine whether two values are roughly equal.

SYNOPSIS

near

USAGE SYNOPSIS

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

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

FUNCTIONS

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

PINS

near.N.in1 float in ( OR <newinstname>.in1 float in )

near.N.in2 float in ( OR <newinstname>.in2 float in )

near.N.scale float io (default: 1.0) ( OR <newinstname>.scale float io (default: 1.0) )

near.N.difference float io (default: 0.0) ( OR <newinstname>.difference float io (default: 0.0) )

near.N.out bit out ( OR <newinstname>.out bit out ) - \fBout\fR is true if \fBin1\fR and \fBin2\fR are within a factor of \fBscale\fR (i.e., for in1 positive, in1/scale ⇐ in2 ⇐ in1*scale), OR if their absolute difference is no greater than \fBdifference\fR (i.e., |in1-in2| ⇐ difference). \fBout\fR is false otherwise.

LICENCE

GPL