SCALED_S32_SUMS(9)
π scaled_s32_sums β HAL component π
okay bestie, so this one is a HAL component β that's <pink>scaled_s32_sums</pink> for the tag, and it's basically a sum of four inputs, where every single input gets its own scale factor. yes, four. four inputs. four scales. it's giving β¨math class but make it slayβ¨.
β¨ SYNOPSIS β¨
loadrt scaled_s32_sums [count=N|names=name1[,name2...]]
that's the whole thing, bestie. that's the moment. π«Ά
π§ FUNCTIONS π§
scaled-s32-sums.Nβ this is the function, and heads up: it requires a floating-point thread. not optional, not a suggestion, it needs it. periodt. π
π PINS π
okay so <lavender>N is the instance number, and every instance gets this exact little friend group of pins:
scaled-s32-sums.N.in0βs32in β first input, the OG πscaled-s32-sums.N.in1βs32in β second input πscaled-s32-sums.N.in2βs32in β third input πscaled-s32-sums.N.in3βs32in β fourth input πscaled-s32-sums.N.scale0βfloatin β default:1.0πΈscaled-s32-sums.N.scale1βfloatin β default:1.0πΈscaled-s32-sums.N.scale2βfloatin β default:1.0πΈscaled-s32-sums.N.scale3βfloatin β default:1.0πΈscaled-s32-sums.N.out-sβs32out β integer output πscaled-s32-sums.N.out-fβfloatout β float output π
and the way that these two outputs work is literally this:
out-s = out-f = (in0 * scale0) + (in1 * scale1) + (in2 * scale2)
+ (in3 * scale3)
no cap. both outputs get the same value of that expression, out-s just hands it to you as an integer and out-f as a float. mul by the scale, add all four, done, iconic. π₯
π SEE ALSO π
go read those too, iykyk π
π AUTHOR π
Chris S Morley β thank you for your service, king π
π LICENSE π
GPL β free as in slay π¦
and that's the whole page bestie β written up by the LinuxCNC Documentation girlies, dated 2026-03-17, so you know it's fresh β¨ go forth and scale those sums π
π¦ 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