Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2f6e4e0 authored by Florian Echtler's avatar Florian Echtler Committed by Jiri Kosina
Browse files

HID: wiimote: fix weight conversion error for values > 17kg

parent 3155a09f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -585,7 +585,8 @@ static void handler_balance_board(struct wiimote_ext *ext, const __u8 *payload)
		} else {
			tmp = val[i] - ext->calib[i][1];
			tmp *= 1700;
			tmp /= ext->calib[i][2] - ext->calib[i][1] + 1700;
			tmp /= ext->calib[i][2] - ext->calib[i][1];
			tmp += 1700;
		}
		val[i] = tmp;
	}