Module utils

Module utils 

Source
Expand description

Utility functions for servo calculations. These functions are independent of ServoConfig and can be tested in isolation.

Constants§

EPSILON
Epsilon value for floating-point comparisons.

Functions§

angle_to_duty
Transforms angle in degrees to absolute duty value.
approx_eq
Checks if two duty values are approximately equal.
calc_duty_range
Calculates duty range in absolute values for given servo configuration.
duty_to_angle
Transforms absolute duty value to angle in degrees.