@@ -350,25 +350,25 @@ FAST_CODE_NOINLINE void rcSmoothingSetFilterCutoffs(rcSmoothingFilter_t *smoothi
350350 for (int i = 0 ; i < PRIMARY_CHANNEL_COUNT ; i ++ ) {
351351 if (i < THROTTLE ) { // Throttle handled by smoothing rcCommand
352352 if (!smoothingData -> filterInitialized ) {
353- pt3FilterInit (& smoothingData -> filter [i ], pt3FilterGain ( smoothingData -> setpointCutoffFrequency , dT ) );
353+ ptnFilterInit (& smoothingData -> filter [i ], rxConfig () -> rc_smoothing_order , smoothingData -> setpointCutoffFrequency , dT );
354354 } else {
355- pt3FilterUpdateCutoff (& smoothingData -> filter [i ], pt3FilterGain ( smoothingData -> setpointCutoffFrequency , dT ) );
355+ ptnFilterUpdate (& smoothingData -> filter [i ], smoothingData -> setpointCutoffFrequency , dT );
356356 }
357357 } else {
358358 if (!smoothingData -> filterInitialized ) {
359- pt3FilterInit (& smoothingData -> filter [i ], pt3FilterGain ( smoothingData -> throttleCutoffFrequency , dT ) );
359+ ptnFilterInit (& smoothingData -> filter [i ], rxConfig () -> rc_smoothing_order , smoothingData -> throttleCutoffFrequency , dT );
360360 } else {
361- pt3FilterUpdateCutoff (& smoothingData -> filter [i ], pt3FilterGain ( smoothingData -> throttleCutoffFrequency , dT ) );
361+ ptnFilterUpdate (& smoothingData -> filter [i ], smoothingData -> throttleCutoffFrequency , dT );
362362 }
363363 }
364364 }
365365
366366 // initialize or update the Level filter
367367 for (int i = FD_ROLL ; i < FD_YAW ; i ++ ) {
368368 if (!smoothingData -> filterInitialized ) {
369- pt3FilterInit (& smoothingData -> filterDeflection [i ], pt3FilterGain ( smoothingData -> setpointCutoffFrequency , dT ) );
369+ ptnFilterInit (& smoothingData -> filterDeflection [i ], rxConfig () -> rc_smoothing_order , smoothingData -> setpointCutoffFrequency , dT );
370370 } else {
371- pt3FilterUpdateCutoff (& smoothingData -> filterDeflection [i ], pt3FilterGain ( smoothingData -> setpointCutoffFrequency , dT ) );
371+ ptnFilterUpdate (& smoothingData -> filterDeflection [i ], smoothingData -> setpointCutoffFrequency , dT );
372372 }
373373 }
374374 }
@@ -546,7 +546,7 @@ static FAST_CODE void processRcSmoothingFilter(void)
546546 for (int i = 0 ; i < PRIMARY_CHANNEL_COUNT ; i ++ ) {
547547 float * dst = i == THROTTLE ? & rcCommand [i ] : & setpointRate [i ];
548548 if (rcSmoothingData .filterInitialized ) {
549- * dst = pt3FilterApply (& rcSmoothingData .filter [i ], rxDataToSmooth [i ]);
549+ * dst = ptnFilterApply (& rcSmoothingData .filter [i ], rxDataToSmooth [i ]);
550550 } else {
551551 // If filter isn't initialized yet, as in smoothing off, use the actual unsmoothed rx channel data
552552 * dst = rxDataToSmooth [i ];
@@ -557,7 +557,7 @@ static FAST_CODE void processRcSmoothingFilter(void)
557557 bool smoothingNeeded = (FLIGHT_MODE (ANGLE_MODE ) || FLIGHT_MODE (HORIZON_MODE )) && rcSmoothingData .filterInitialized ;
558558 for (int axis = FD_ROLL ; axis <= FD_YAW ; axis ++ ) {
559559 if (smoothingNeeded && axis < FD_YAW ) {
560- rcDeflectionSmoothed [axis ] = pt3FilterApply (& rcSmoothingData .filterDeflection [axis ], rcDeflection [axis ]);
560+ rcDeflectionSmoothed [axis ] = ptnFilterApply (& rcSmoothingData .filterDeflection [axis ], rcDeflection [axis ]);
561561 } else {
562562 rcDeflectionSmoothed [axis ] = rcDeflection [axis ];
563563 }
@@ -586,7 +586,7 @@ FAST_CODE void processRcCommand(void)
586586#endif
587587
588588 float angleRate ;
589-
589+
590590#ifdef USE_GPS_RESCUE
591591 if ((axis == FD_YAW ) && FLIGHT_MODE (GPS_RESCUE_MODE )) {
592592 // If GPS Rescue is active then override the setpointRate used in the
0 commit comments