vacuglide

package
v0.1.0-alpha.85 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: GPL-3.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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

func MotorPercent(pace float64) float64

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

func NewRenderer(profile Profile) *Renderer

NewRenderer returns a renderer for profile.

func (*Renderer) Reach

func (r *Renderer) Reach(timeline *companion.Timeline, at float64) (float64, bool)

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

func (r *Renderer) SetProfile(profile Profile)

SetProfile applies a new scale from the next sample.

func (*Renderer) Speed

func (r *Renderer) Speed(timeline *companion.Timeline, at float64) (float64, bool)

Speed is the motor speed in percent at stream time at: zero while the frame holds still, and at least FloorPercent while it moves. It reports false where the frame does not cover at, so the owner stops the motor there.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL