Documentation
¶
Overview ¶
Package vacuglide renders the VacuGlide's controls from the shared motion frame (ADR 0069). The VacuGlide has no position input: a crank-driven piston moves air that pulls and pushes its sleeve, so the motor sets the pace, and the air sealed in the sleeve sets how long and tight each stroke is. The motor follows how fast the frame moves; an optional follower reads how far the frame's strokes reach and steps the stroke valves toward it.
Index ¶
Constants ¶
const ( // FullSpeedTravel is Autoblow's own scale: a script moving 600 position // units per second plays at 100% motor speed. FullSpeedTravel = 600.0 // FloorPercent keeps a moving frame above the motor's stall point, about // 4% on Autoblow's scale. FloorPercent = 5.0 // HoldPercent is the pace below which the frame is holding still, so the // motor stops instead of stalling. HoldPercent = 1.0 // SpeedWindowMillis averages pace over about one stroke: the VacuGlide // makes its own strokes, so it follows pace, not each turnaround. SpeedWindowMillis = 1000.0 // ReachWindowMillis looks back far enough to include a whole slow stroke. ReachWindowMillis = 2500.0 )
Variables ¶
This section is empty.
Functions ¶
func MotorPercent ¶
MotorPercent applies the stall floor and the hold: what the motor is told.
Types ¶
type Profile ¶
type Profile struct {
Scale float64
}
Profile scales motor speed. Scale 1 keeps the pace the frame would have on The Handy; a larger scale stretches MagicHandy's top speed toward the motor's.
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer turns the frame into a motor speed and a stroke reach. It keeps only smoothing state; it never reshapes the frame.
func NewRenderer ¶
NewRenderer returns a renderer for profile.
func (*Renderer) Reach ¶
Reach is how far toward the base the frame's strokes reached over the last ReachWindowMillis, in percent: 100 means strokes reach the base, 0 that they stay at the tip. Position 0 is the base end of the frame.
func (*Renderer) Restart ¶
func (r *Renderer) Restart()
Restart forgets smoothing for a new or resumed stream.
func (*Renderer) SetProfile ¶
SetProfile applies a new scale from the next sample.