Slew rate limitter scambled controls

We are trying to use slew rate limiters for both joysticks on an xbox controller.
It was working fine. Then between enable-disable-enable in driverstation the controls were completely scrambled. The wrong joystick is fowards and turn.
We replicated the problem twice. But the coding remained the same.

We had two filter objects:
SlewRateLimiter filterY = new SlewRateLimiter;
SlewRateLimiter filterX = new SlewRateLimiter;

Used in aracdedrive:
robot.arcadedrive((filterY.calculate(-driver.getLeftY)),(filterX.calculate(-driver.getRightX)));

Are we constructing the slew objects wrong. Do we need to use reset?

SlewRateLimiter is a very simple class that knows nothing about your controls, so that’s not possible.

You say you’re using an Xbox controller. Is it an official one, or like a Logitech one?

2 Likes

It happened with two different offbrand controllers. One is YAEYE brand, the other Logitech.
We’ve been practicing with the same controllers and only a slew filter on forward but problem hasnt reoccured. Our turning is just jerky; we want two filters.

I get what you are saying but when we only used one filter it seemed to solve the problem.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.