1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-20 14:55:18 +03:00

remove rpm filter from fast_code

This commit is contained in:
Pawel Spychalski (DzikuVx) 2020-03-11 20:27:05 +01:00
parent 63b0bd74ff
commit 0d0929aaa1
6 changed files with 14 additions and 12 deletions

View file

@ -142,7 +142,7 @@ float NOINLINE getThrottleScale(float globalThrottleScale) {
}
}
int16_t FAST_CODE getRcCommandOverride(int16_t command[], uint8_t axis) {
int16_t getRcCommandOverride(int16_t command[], uint8_t axis) {
int16_t outputValue = command[axis];
if (GLOBAL_FUNCTION_FLAG(GLOBAL_FUNCTION_FLAG_OVERRIDE_SWAP_ROLL_YAW) && axis == FD_ROLL) {

View file

@ -655,10 +655,10 @@ void init(void)
#ifdef USE_RPM_FILTER
disableRpmFilters();
if (STATE(ESC_SENSOR_ENABLED) && (rpmFilterConfig()->gyro_filter_enabled || rpmFilterConfig()->dterm_filter_enabled)) {
// if (STATE(ESC_SENSOR_ENABLED) && (rpmFilterConfig()->gyro_filter_enabled || rpmFilterConfig()->dterm_filter_enabled)) {
rpmFiltersInit();
setTaskEnabled(TASK_RPM_FILTER, true);
}
// }
#endif
systemState |= SYSTEM_STATE_READY;

View file

@ -290,7 +290,7 @@ void mixerResetDisarmedMotors(void)
}
}
static FAST_CODE NOINLINE uint16_t handleOutputScaling(
static uint16_t handleOutputScaling(
int16_t input, // Input value from the mixer
int16_t stopThreshold, // Threshold value to check if motor should be rotating or not
int16_t onStopValue, // Value sent to the ESC when min rotation is required - on motor_stop it is STOP command, without motor_stop it's a value that keeps rotation
@ -318,7 +318,7 @@ static FAST_CODE NOINLINE uint16_t handleOutputScaling(
return value;
}
void FAST_CODE NOINLINE writeMotors(void)
void FAST_CODE writeMotors(void)
{
for (int i = 0; i < motorCount; i++) {
uint16_t motorValue;
@ -438,7 +438,7 @@ static int getReversibleMotorsThrottleDeadband(void)
return feature(FEATURE_MOTOR_STOP) ? reversibleMotorsConfig()->neutral : directionValue;
}
void FAST_CODE NOINLINE mixTable(const float dT)
void FAST_CODE mixTable(const float dT)
{
int16_t input[3]; // RPY, range [-500:+500]
// Allow direct stick input to motors in passthrough mode on airplanes

View file

@ -22,6 +22,8 @@
* along with this program. If not, see http://www.gnu.org/licenses/.
*/
#include "platform.h"
#include "flight/rpm_filter.h"
#include "config/parameter_group.h"
@ -82,7 +84,7 @@ void nullRpmFilterUpdate(rpmFilterBank_t *filterBank, uint8_t motor, float baseF
UNUSED(baseFrequency);
}
float FAST_CODE rpmFilterApply(rpmFilterBank_t *filterBank, uint8_t axis, float input)
float rpmFilterApply(rpmFilterBank_t *filterBank, uint8_t axis, float input)
{
float output = input;
@ -136,7 +138,7 @@ void disableRpmFilters(void) {
rpmGyroApplyFn = (rpmFilterApplyFnPtr)nullRpmFilterApply;
}
void FAST_CODE NOINLINE rpmFilterUpdate(rpmFilterBank_t *filterBank, uint8_t motor, float baseFrequency)
void rpmFilterUpdate(rpmFilterBank_t *filterBank, uint8_t motor, float baseFrequency)
{
for (int axis = 0; axis < XYZ_AXIS_COUNT; axis++)
{
@ -177,7 +179,7 @@ void rpmFiltersInit(void)
}
}
void FAST_CODE NOINLINE rpmFilterUpdateTask(timeUs_t currentTimeUs)
void rpmFilterUpdateTask(timeUs_t currentTimeUs)
{
UNUSED(currentTimeUs);
@ -198,7 +200,7 @@ void FAST_CODE NOINLINE rpmFilterUpdateTask(timeUs_t currentTimeUs)
}
}
float FAST_CODE rpmFilterGyroApply(uint8_t axis, float input)
float rpmFilterGyroApply(uint8_t axis, float input)
{
return rpmGyroApplyFn(&gyroRpmFilters, axis, input);
}

View file

@ -3433,7 +3433,7 @@ bool navigationRTHAllowsLanding(void)
(allow == NAV_RTH_ALLOW_LANDING_FS_ONLY && FLIGHT_MODE(FAILSAFE_MODE));
}
bool FAST_CODE isNavLaunchEnabled(void)
bool isNavLaunchEnabled(void)
{
return IS_RC_MODE_ACTIVE(BOXNAVLAUNCH) || feature(FEATURE_FW_LAUNCH);
}

View file

@ -178,7 +178,7 @@ void setTaskEnabled(cfTaskId_e taskId, bool enabled)
}
}
timeDelta_t FAST_CODE NOINLINE getTaskDeltaTime(cfTaskId_e taskId)
timeDelta_t getTaskDeltaTime(cfTaskId_e taskId)
{
if (taskId == TASK_SELF) {
return currentTask->taskLatestDeltaTime;