GEARCHANGE(9)
π GEARCHANGE π
okay bestie, gather round, because we're talking about gearchange β a HAL component that lets you select from one two speed ranges β¨ (yes, two ranges, that's the whole vibe). It's giving β¨gear selectorβ¨, and honestly? iconic.
β¨ SYNOPSIS β¨
The way this works is: the output is a value scaled for the selected gear, and then clamped to the min/max values for that gear. No cap.
The scale of gear 1 is assumed to be 1, so you gotta choose the scale of your output device accordingly, fr fr.
The scale of gear 2 is relative to gear 1. So like, if gear 2 runs the spindle 2.5 times as fast as gear 1, then scale2 should be set to 2.5. math queen behavior π
πΈ FUNCTIONS πΈ
gearchange.Nβ requires a floating-point thread π§΅
π¦ PINS π¦
gearchange.N.selbit inβ the gear selection input π (pick your fighter)gearchange.N.speed-infloat inβ speed command input, come thru πgearchange.N.speed-outfloat outβ the speed command headed to your DAC/PWM πgearchange.N.dir-inbit inβ direction command input βgearchange.N.dir-outbit outβ direction output β which may or may not be inverted for second gear, iykyk π
π PARAMETERS π
gearchange.N.min1float rw(default:0) β minimum allowed speed in gear range 1 πgearchange.N.max1float rw(default:100000) β maximum allowed speed in gear range 1 πgearchange.N.min2float rw(default:0) β minimum allowed speed in gear range 2 πgearchange.N.max2float rw(default:100000) β maximum allowed speed in gear range 2 πgearchange.N.scale2float rw(default:1.0) β relative scale of gear 2 vs. gear 1. Since it's assumed that gear 2 is "high gear",scale2must be greater than 1, and it will be reset to 1 if set lower π«Άgearchange.N.reversebit rw(default:0) β set to1to reverse the spindle in second gear π₯
π AUTHOR π
Stephen Wille Padnos π (the moment, the icon, the legend)
π LICENSE π
GPL β periodt.
lowkey a whole serve, highkey a HAL component. go forth and gear-change, bestie πΈπ¦π
that's the whole page, no notes. brought to you by the LinuxCNC Documentation girlies, dated 2026-03-17 β see u in the next manpage, 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