Limiting of throttle curves has no effect
Forums:
The truncation of the val for the throttle curve has no effect because the absolute of it (val_a) is defined previously. So the truncation should be done before val_a is created.
float throttle_curve(float val, float curve_acc, float curve_brake, int mode) {
float ret = 0.0;
float val_a = fabsf(val); <-WRONG HERE
if (val < -1.0) {
val = -1.0;
}
if (val > 1.0) {
val = 1.0;
}
<-BETTER HERE
- Read more about Limiting of throttle curves has no effect
- 1 comment
- Log in or register to post comments