Skip to main content

pamoja_servo_map_angle

Function pamoja_servo_map_angle 

Source
#[unsafe(no_mangle)]
pub extern "C" fn pamoja_servo_map_angle( servo: PamojaServoMap, pulse_us: u16, ) -> f32
Expand description

Returns the angle a servo pulse width sets.

§Arguments

  • servo - the servo.
  • pulse_us - the pulse width in microseconds, held to the servo’s range.

§Returns

The angle in degrees, or 0 for a servo whose pulse range is empty.