Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1361 → Rev 1362

/branches/V0.74d-FredericG/fc.c
154,8 → 154,36
int MotorSmoothing(int neu, int alt)
{
int motor;
if(neu > alt) motor = (1*(int)alt + neu) / 2;
else motor = neu - (alt - neu)*1;
if(neu > alt)
{
motor = (1*(int)alt + neu) / 2;
}
else
 
// Arthur P: the original code allowed the motor value to drop to 0 or negative values
// straight off, i.e. could amplify an intended decrease excessively while upregulation
// is dampened. The modification would still allow immediate drop below intended value
// but would dampen this. This would still allow for airbraking of the prop to have effect
// but it might lead to less sudden excessive drops in rpm with only gradual recovery.
 
{
if(Parameter_UserParam1 < 1)
{ // Original function
motor = neu - (alt - neu)*1;
}
else
{
if(Parameter_UserParam1 == 1) // If userpara1 = 1 then 150% down on the first step followed by upsmoothing.
{
motor = neu - (1*(alt - neu)/2);
}
else // If userpara1 > 1 then allow >= 50% of the intended step down to rapidly reach the intended value.
{
motor = neu + ((alt - neu)/Parameter_UserParam1);
}
}
}
//if(Poti2 < 20) return(neu);
return(motor);
}
/branches/V0.74d-FredericG/makefile
54,7 → 54,7
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)c
endif
ifeq ($(VERSION_PATCH), 3)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)d
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)d-FredericG
endif
ifeq ($(VERSION_PATCH), 4)
TARGET = Flight-Ctrl_$(HEX_NAME)_V$(VERSION_MAJOR)_$(VERSION_MINOR)e
/branches/V0.74d-FredericG/menu.c
45,7 → 45,7
{
case 0:
LCD_printfxy(0,0,"+ MikroKopter +");
LCD_printfxy(0,1,"HW:V%d.%d SW:%d.%d%c",PlatinenVersion/10,PlatinenVersion%10, VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH +'a');
LCD_printfxy(0,1,"HW:V%d.%d SW:%d.%d%c-FG",PlatinenVersion/10,PlatinenVersion%10, VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH +'a');
LCD_printfxy(0,2,"Setting:%d %s",GetActiveParamSetNumber(),Mixer.Name);
if(I2CTimeout < 6) LCD_printfxy(0,3,"I2C ERROR!!!")
else