HID: nintendo: Rate limit IMU compensation message
Some controllers are very bad at updating the IMU, leading to these messages spamming the syslog. Rate-limiting them helps with this a bit. Signed-off-by: Vicki Pfau <vi@endrift.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
This commit is contained in:
parent
b73bc6a51f
commit
b8874720b2
|
|
@ -1455,10 +1455,10 @@ static void joycon_parse_imu_report(struct joycon_ctlr *ctlr,
|
|||
ctlr->imu_avg_delta_ms;
|
||||
ctlr->imu_timestamp_us += 1000 * ctlr->imu_avg_delta_ms;
|
||||
if (dropped_pkts > JC_IMU_DROPPED_PKT_WARNING) {
|
||||
hid_warn(ctlr->hdev,
|
||||
hid_warn_ratelimited(ctlr->hdev,
|
||||
"compensating for %u dropped IMU reports\n",
|
||||
dropped_pkts);
|
||||
hid_warn(ctlr->hdev,
|
||||
hid_warn_ratelimited(ctlr->hdev,
|
||||
"delta=%u avg_delta=%u\n",
|
||||
delta, ctlr->imu_avg_delta_ms);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue