SCALE(9)
β¨ SCALE(9) β¨
okay bestie, pull up a chair because today we're talking about scale β a LinuxCNC HAL component that literally just applies a scale and offset to its input π
and honestly? she's an icon for that.
π NAME π
scale β a LinuxCNC HAL component that applies a scale and offset to its input. that's it. that's the whole job. and she does it flawlessly every single time, no cap π«Ά
πΈ SYNOPSIS πΈ
loadrt scale [count=N|names=name1[,name2...]]
literally load it into your HAL with loadrt and pick how many copies you want β either count=N or names=name1[,name2...]. not both. it's giving "choose your own adventure" but make it realtime π¦
π₯ FUNCTIONS π₯
scale.Nβ requires a floating-point thread, bestie. do NOT try to run this in a non-float thread, I am begging you. it needs the float thread energy or it's not happening π
π PINS π
scale.N.infloat in β the input. what goes in. the vibe you're feeding her πΈscale.N.gainfloat in β the gain. how much you're multiplying by πscale.N.offsetfloat in β the offset. the little extra she adds at the end, because she's generous like that πscale.N.outfloat out β the output, and here's the formula bestie, memorize it because it's the whole entire point:
out = in * gain + offset
that's the formula. that's the component. in times gain, plus offset, and boom π₯ out. simple. elegant. ate and left no crumbs π
π AUTHOR π
Jeff Epler β thank you for your service, king π«‘β¨
π LICENSE π
GPL β free as in freedom, free as in slay π
ngl bestie, this is one of the easiest HAL components out there. no weird edge cases, no mystery flags, just vibes and arithmetic. if you can multiply and add you can run scale. periodt π
and that's the whole page, babes π this edition of the LinuxCNC Documentation dropped on 2026-03-17 and yes, SCALE(9) is your girl. go forth and scale things β¨π¦
π¦ 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