if (input >= 47 && (zero_crosses < (20 >> stall_protection))) {
if (duty_cycle_setpoint < min_startup_duty) {
duty_cycle_setpoint = min_startup_duty;
}
if (duty_cycle_setpoint > startup_max_duty_cycle) {
duty_cycle_setpoint = startup_max_duty_cycle;
}
}
throttle_max_at_low_rpm 400(2000)
throttle_max_at_high_rpm
throttle_max_at_low_rpm = throttle_max_at_low_rpm * TIMER1_MAX_ARR / 2000; // adjust to new pwm frequency
throttle_max_at_high_rpm = TIMER1_MAX_ARR; // adjust to new pwm frequency
char RC_CAR_REVERSE = 0; // have to set bidirectional, comp_pwm off and stall // protection off, no sinusoidal startup