Function rc_servo_send_oneshot_pulse_normalized#
Defined in File servo.h
Function Documentation#
-
int rc_servo_send_oneshot_pulse_normalized(int ch, double input)#
Like rc_send_pulse_normalized but translates a desired esc throttle position from 0 to 1.0 to a corresponding pulse width from 125 to 250us.
A recent trend among ESCs is support of “One-Shot” mode which shrinks the pulse range down to 125-250us for reduced latency. If you are sure your ESCs support this then you may try this function.
While the normal operating range for the normalized input is 0.0 to 1.0, inputs as low as -0.1 are allowed. This is because many ESC firmwares such as BLHeli will still turn or chirp the motors at 0.0 throttle, but will be stationary and still armed and awake with throttle values slightly lower. We suggest using a throttle of -0.1 for at least a second at the beginnig of your program to wake the ESCs up from sleep but still keep the motors still.
- Parameters:
ch – [in] Channel to send signal to (1-8) or 0 to send to all channels.
input – [in] normalized position from -0.1 to 1.0
- Returns:
0 on success, -1 on failure