commit
b1d1fba775
|
@ -325,7 +325,7 @@ static const char * const lookupTableGyroOverflowCheck[] = {
|
|||
#endif
|
||||
|
||||
static const char * const lookupTableRatesType[] = {
|
||||
"BETAFLIGHT", "RACEFLIGHT"
|
||||
"BETAFLIGHT", "RACEFLIGHT", "KISS"
|
||||
};
|
||||
|
||||
#ifdef USE_OVERCLOCK
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
typedef enum {
|
||||
RATES_TYPE_BETAFLIGHT = 0,
|
||||
RATES_TYPE_RACEFLIGHT,
|
||||
RATES_TYPE_KISS,
|
||||
} ratesType_e;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -148,6 +148,17 @@ float applyRaceFlightRates(const int axis, float rcCommandf, const float rcComma
|
|||
return angleRate;
|
||||
}
|
||||
|
||||
float applyKissRates(const int axis, float rcCommandf, const float rcCommandfAbs)
|
||||
{
|
||||
const float rcCurvef = currentControlRateProfile->rcExpo[axis] / 100.0f;
|
||||
|
||||
float kissRpyUseRates = 1.0f / (constrainf(1.0f - (rcCommandfAbs * (currentControlRateProfile->rates[axis] / 100.0f)), 0.01f, 1.00f));
|
||||
float kissRcCommandf = (power3(rcCommandf) * rcCurvef + rcCommandf * (1 - rcCurvef)) * (currentControlRateProfile->rcRates[axis] / 1000.0f);
|
||||
float kissAngle = constrainf(((2000.0f * kissRpyUseRates) * kissRcCommandf), -SETPOINT_RATE_LIMIT, SETPOINT_RATE_LIMIT);
|
||||
|
||||
return kissAngle;
|
||||
}
|
||||
|
||||
static void calculateSetpointRate(int axis)
|
||||
{
|
||||
float angleRate;
|
||||
|
@ -711,6 +722,10 @@ void initRcProcessing(void)
|
|||
case RATES_TYPE_RACEFLIGHT:
|
||||
applyRates = applyRaceFlightRates;
|
||||
|
||||
break;
|
||||
case RATES_TYPE_KISS:
|
||||
applyRates = applyKissRates;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue