From 9f2a9d3e590e796f340036d910873916de33b4cc Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Wed, 18 Nov 2026 09:12:00 +0300 Subject: [PATCH] Gyro drift learning at rest is off by default: subtracting a learned bias made aiming feel worse in play before, so it stays a switch for players with a drifting controller Co-Authored-By: Claude Opus 5.5 --- runtime/cfg.c | 2 +- runtime/motion_fusion.c | 3 ++- totk.ini.example | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/runtime/cfg.c b/runtime/cfg.c index 121c7040..8fd7559f 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -170,7 +170,7 @@ static const CfgMeta metas[] = { // Sound, Controls, Menu {"VOLUME", "100", "0..100", LIVE}, {"VOLUME_MUSIC", "100", "0..100", LIVE}, {"VOLUME_SFX", "100", "0..100", LIVE}, {"VOLUME_VOICE", "100", "0..100", LIVE}, {"AUDIO_CHANNELS", "stereo", "auto|stereo|5.1", RESTART}, {"AUDIO_DEVICE", "", NULL, LIVE}, // audio_mixer.c output_worker: a device name, empty for the system default - {"MOTION", "1", "0|1", LIVE}, {"GYRO_CALIBRATION", "1", "0|1", LIVE}, {"GYRO_AUTO_BIAS", "1", "0|1", LIVE}, + {"MOTION", "1", "0|1", LIVE}, {"GYRO_CALIBRATION", "1", "0|1", LIVE}, {"GYRO_AUTO_BIAS", "0", "0|1", LIVE}, {"RUMBLE_STRENGTH", "130", "0..300", LIVE}, {"RUMBLE_CURVE", "0.6", "0.2..1.5", LIVE}, // Written by the Calibrate gyro row (motion_fusion.c save_bias), not by hand; read by input.c pad_bias_select when a // controller connects and gyro_bias_pad names it. diff --git a/runtime/motion_fusion.c b/runtime/motion_fusion.c index e54e14f5..136908b2 100644 --- a/runtime/motion_fusion.c +++ b/runtime/motion_fusion.c @@ -167,7 +167,8 @@ static void integrate(double R[3][3], const double gyro[3], const double acc[3], orthonormalize(R); } -// The tracker's own switch (gyro_auto_bias, live, default 1). Off, nothing is learned or subtracted. +// The tracker's own switch (gyro_auto_bias, live, default 0: subtracting a learned bias made aiming feel worse in +// play, cause unknown). Off, nothing is learned or subtracted. int motion_auto_bias_enabled(void) { static int on = -1; static unsigned seen; diff --git a/totk.ini.example b/totk.ini.example index bc062f21..fd0e65cf 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -380,12 +380,12 @@ # gyro and an attempt in progress is dropped; the four keys below stay in the file, so turning it back on restores the # last calibration. # gyro_calibration = 1 -# Gyro drift at rest (1 = on): whenever the controller lies still (on a table, not held) for half a second, the game +# Gyro drift at rest (1 = on, off by default): whenever the controller lies still (on a table, not held) for half a second, the game # learns the drift left in its gyro, after the calibration above if there is one, and subtracts it, as the Switch's # hid service does for its own controllers. It catches a bias that changes as the controller warms up and works # without a calibration. The log says "gyro drift at rest learned" once it has settled. A controller held in the hand # is not learned from, and there is no dead zone, so slow aiming is untouched. Off, nothing is learned or subtracted. -# gyro_auto_bias = 1 +# gyro_auto_bias = 0 # The measured bias in rad/s and the controller it was measured from, written by the game when calibration finishes; # they are not meant to be typed. The bias applies only while gyro_bias_pad names the connected controller (its name, # plus a hash of its serial number when it reports one), so another controller starts with no bias. One controller's