KNOB2FLOAT(9)
β¨ KNOB2FLOAT(9) β¨
okay bestie so this is a HAL component, right? it's called knob2float and what it does is take counts (like, probably from an encoder, you know the vibe) and turn them into a float value. count β float. knob β output. it's giving translator. it's giving glow-up. π
π SYNOPSIS π
loadrt knob2float [count=N|names=name1[,name2...]]
so you load it with count=N or names=name1[,name2...] β pick your fighter, either way you're getting your instances named and numbered. πΈ
π¦ FUNCTIONS π¦
knob2float.Nβ requires a floating-point thread, no exceptions, she's picky and honestly? same
(that .N is the instance number btw, every instance gets its own lil numbered everything. iykyk π
)
π PINS π
knob2float.N.countss32in β the counts, literally just the counts, that's the whole input, that's what she's here forknob2float.N.enablebitin β when it'sTRUE, the output is controlled by count. when it'sFALSE, the output is just fixed and stays put like a wallflower πknob2float.N.scalefloatin β how much the output moves per single count. your multiplier. your ratio. your β¨mathβ¨knob2float.N.outfloatout β boom, the output value, the whole point of the operation, the main character π₯
π PARAMETERS π
knob2float.N.max-outfloatrw (default:1.0) β the maximum output value. if you keep cranking counts past this, they get straight up ignored. she said no thank you, we're done here πknob2float.N.min-outfloatrw (default:0.0) β the minimum output value. same energy but downward: go below this and the extra decreases get ignored, nothing to see here, we're not going lower π
πΈ AUTHOR πΈ
John Kasunich. legend behaviour, no cap. π«Ά
β LICENSE β
GPL β free as in freedom bestie, go wild β¨
fr fr this one's simple and that's the beauty of it: counts in, float out, clamped betweenmin-outandmax-out, scaled byscale, enabled or not byenable. that's it. that's the whole girl. slay. π
β that's the whole manual, written up by LinuxCNC Documentation on 2026-03-17, ty for coming to my ted talk, mwah π
π¦ where this page comes from
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms