|
|
@@ -191,10 +191,10 @@ static void eRamp_set_X2_target(e_Ramp *ramp, float c) {
|
|
|
float step_ms = CONFIG_eCTRL_STEP_TS;
|
|
|
if (delta > 0) {
|
|
|
step_val = (delta)/(ramp->acct/step_ms);
|
|
|
- if (step_val > 0.1f) {
|
|
|
- float first_delta = min(delta, 5.0f);
|
|
|
+ if (step_val > CONFIG_RAMP_SECOND_STEP) {
|
|
|
+ float first_delta = min(delta, CONFIG_RAMP_SECOND_TARGET);
|
|
|
ramp->first_target = c_now + first_delta;
|
|
|
- ramp->first_step = 0.1f;
|
|
|
+ ramp->first_step = CONFIG_RAMP_SECOND_STEP;
|
|
|
delta -= first_delta;
|
|
|
step_val = (delta)/(ramp->acct/step_ms);
|
|
|
}else {
|
|
|
@@ -202,10 +202,10 @@ static void eRamp_set_X2_target(e_Ramp *ramp, float c) {
|
|
|
}
|
|
|
}else if (delta < 0){
|
|
|
step_val = (delta)/(ramp->dect/step_ms);
|
|
|
- if (ABS(step_val) > 0.1f) {
|
|
|
- float first_delta = MAX(delta, -5.0f);
|
|
|
+ if (ABS(step_val) > CONFIG_RAMP_SECOND_STEP) {
|
|
|
+ float first_delta = MAX(delta, -CONFIG_RAMP_SECOND_TARGET);
|
|
|
ramp->first_target = c_now + first_delta;
|
|
|
- ramp->first_step = -0.1f;
|
|
|
+ ramp->first_step = -CONFIG_RAMP_SECOND_STEP;
|
|
|
delta -= first_delta;
|
|
|
step_val = (delta)/(ramp->dect/step_ms);
|
|
|
}else {
|