KNOB2FLOAT(9)

πŸ“¦
version 2.9.4 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

✨ 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.counts s32 in β€” the counts, literally just the counts, that's the whole input, that's what she's here for
  • knob2float.N.enable bit in β€” when it's TRUE, the output is controlled by count. when it's FALSE, the output is just fixed and stays put like a wallflower πŸ™ˆ
  • knob2float.N.scale float in β€” how much the output moves per single count. your multiplier. your ratio. your ✨math✨
  • knob2float.N.out float out β€” boom, the output value, the whole point of the operation, the main character πŸ”₯

πŸ’œ PARAMETERS πŸ’œ

  • knob2float.N.max-out float rw (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-out float rw (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 between min-out and max-out, scaled by scale, enabled or not by enable. 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