jacdac.weight_scale

Submodules

Package Contents

Classes

WeightScaleClient

A weight measuring sensor.

class jacdac.weight_scale.WeightScaleClient(bus: jacdac.bus.Bus, role: str, *, missing_weight_value: Optional[float] = None)

Bases: jacdac.bus.SensorClient

A weight measuring sensor. Implements a client for the Weight Scale service.

property weight Optional[float]

The reported weight., _: kg

property weight_error Optional[float]

(Optional) The estimate error on the reported reading., _: kg

property zero_offset Optional[float]

(Optional) Calibrated zero offset error on the scale, i.e. the measured weight when nothing is on the scale. You do not need to subtract that from the reading, it has already been done., _: kg

property gain Optional[float]

(Optional) Calibrated gain on the weight scale error.,

property max_weight Optional[float]

(Optional) Maximum supported weight on the scale., _: kg

property min_weight Optional[float]

(Optional) Minimum recommend weight on the scale., _: kg

property weight_resolution Optional[float]

(Optional) Smallest, yet distinguishable change in reading., _: kg

property variant Optional[jacdac.weight_scale.constants.WeightScaleVariant]

(Optional) The type of physical scale,

calibrate_zero_offset() None

Call this command when there is nothing on the scale. If supported, the module should save the calibration data.

calibrate_gain(weight: float) None

Call this command with the weight of the thing on the scale.