mirror of https://github.com/rusefi/bldc.git
first try with simplified position setter.
This commit is contained in:
parent
b6a8cf41a5
commit
690e7fd37a
|
@ -333,6 +333,16 @@ static THD_FUNCTION(ppm_thread, arg) {
|
|||
}
|
||||
break;
|
||||
|
||||
case PPM_CTRL_TYPE_PID_POSITION: // make this an actual type.
|
||||
if (fabsf(servo_val) < 0.001) {
|
||||
pulses_without_power++;
|
||||
}
|
||||
|
||||
if (!(pulses_without_power < MIN_PULSES_WITHOUT_POWER && config.safe_start)) {
|
||||
mc_interface_set_pid_pos(servo_val * 360);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -550,12 +550,13 @@ typedef enum {
|
|||
PPM_CTRL_TYPE_CURRENT,
|
||||
PPM_CTRL_TYPE_CURRENT_NOREV,
|
||||
PPM_CTRL_TYPE_CURRENT_NOREV_BRAKE,
|
||||
PPM_CTRL_TYPE_CURRENT_BRAKE_REV_HYST,
|
||||
PPM_CTRL_TYPE_CURRENT_SMART_REV,
|
||||
PPM_CTRL_TYPE_DUTY,
|
||||
PPM_CTRL_TYPE_DUTY_NOREV,
|
||||
PPM_CTRL_TYPE_PID,
|
||||
PPM_CTRL_TYPE_PID_NOREV,
|
||||
PPM_CTRL_TYPE_CURRENT_BRAKE_REV_HYST,
|
||||
PPM_CTRL_TYPE_CURRENT_SMART_REV
|
||||
PPM_CTRL_TYPE_PID_POSITION
|
||||
} ppm_control_type;
|
||||
|
||||
typedef struct {
|
||||
|
|
Loading…
Reference in New Issue