ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
11.06k stars 17.63k forks source link

Feature request: Support negative RPM for dynamic harmonic notch #28303

Closed RickReeser closed 1 month ago

RickReeser commented 1 month ago

Copter 4.5.6

Some specifications allow ESC telemetry to send negative RPM if the motor is spinning backwards (or just clockwise vs. counter-clockwise, as in my case), e.g. DroneCAN esc status message. RPM-tracking notches do not use negative RPM and they will just sit at the minimum frequency: image

Suggestion: I suppose the naive solution of using the absolute value of RPM would suffice?

Platform [ ] All [ ] AntennaTracker [ x ] Copter [ x ] Plane [ ] Rover [ ] Submarine

andyp1per commented 1 month ago

Certainly some judicious fabsf() would probably fix this and would be easy to do.

andyp1per commented 1 month ago

Please can you try

RickReeser commented 1 month ago

Yeah, I will look into it today. I don't have any familiarity with the filtering classes, but I suppose this will be a good introduction.

andyp1per commented 1 month ago

Yeah, I will look into it today. I don't have any familiarity with the filtering classes, but I suppose this will be a good introduction.

Did you see the PR I did?

RickReeser commented 1 month ago

Nope, just saw it. Will try your PR now.