idzio: Adjust and document [io3] restrict= setting

This commit is contained in:
Tau
2019-11-24 12:59:02 -05:00
parent eb58c0ef23
commit 2402e6cb88
3 changed files with 15 additions and 3 deletions

View File

@ -91,7 +91,7 @@ void idz_io_config_load(struct idz_io_config *cfg, const wchar_t *filename)
cfg->vk_test = GetPrivateProfileIntW(L"io3", L"test", '1', filename);
cfg->vk_service = GetPrivateProfileIntW(L"io3", L"service", '2', filename);
cfg->vk_coin = GetPrivateProfileIntW(L"io3", L"coin", '3', filename);
cfg->restrict_ = GetPrivateProfileIntW(L"io3", L"restrict", 196, filename);
cfg->restrict_ = GetPrivateProfileIntW(L"io3", L"restrict", 97, filename);
GetPrivateProfileStringW(
L"io3",

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;
}