idzio: Adjust and document [io3] restrict= setting

This commit is contained in:
Tau
2019-11-24 12:59:02 -05:00
parent 65eda2a9f1
commit 9ac573801a
3 changed files with 15 additions and 3 deletions

View File

@ -85,10 +85,10 @@ void idz_io_jvs_read_analogs(struct idz_io_analog_state *out)
/* Apply steering wheel restriction. Real cabs only report about 77% of
the IO-3's max ADC output value when the wheel is turned to either of
its maximum positions. To match this behavior we set the default value
for the wheel restriction config parameter to 196 (out of 256). This
for the wheel restriction config parameter to 97 (out of 128). This
scaling factor is applied using fixed-point arithmetic below. */
out->wheel = (tmp.wheel * idz_io_cfg.restrict_) / 256;
out->wheel = (tmp.wheel * idz_io_cfg.restrict_) / 128;
out->accel = tmp.accel;
out->brake = tmp.brake;
}