Overview Clamps Packages CM Dictionary Clamps Dictionary Fomus
Next: ssensor-port , Previous: ssensor-mac , Up: S , Home: Overview

Clamps Dictionary

ssensor-make-zupt

Function

(ssensor-make-zupt id &key (timeout 3.0) (threshold 0.1))

Create a position-reset watcher for sensor id.

State machine:

  1. Wait until acc magnitude is within threshold g of 1g (sensor still), OR no data arrives for timeout seconds (delta gate suppressing TX).
  2. Once still for timeout seconds, reset position once.
  3. Wait until acc magnitude exceeds threshold (sensor moving again).
  4. Go to 1.

Returns an unwatch thunk to stop the watcher.

Arguments

id Integer in the range [1..127] denoting the id of the sensor.
:timeout Seconds still before resetting velocity. Default: 3.0.
:threshold Max deviation from 1g to consider stationary. Default: 0.1.

Author: Orm Finnendahl

Created: 2026-07-31 Fr 13:00

Validate