Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1223 → Rev 1224

/trunk/fc.c
866,7 → 866,7
}
 
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(!Looping_Nick && !Looping_Roll && Aktuell_az > 512)
if(!Looping_Nick && !Looping_Roll && (Aktuell_az > 512 || MotorenEin))
{
long tmp_long, tmp_long2;
if(FromNaviCtrl_Value.Kalman_K != -1 /*&& !TrichterFlug*/)
1172,7 → 1172,7
DebugOut.Analog[3] = Mittelwert_AccRoll / 4;
DebugOut.Analog[4] = MesswertGier;
DebugOut.Analog[5] = HoehenWert;
DebugOut.Analog[6] = (Mess_Integral_Hoch / 512);//Aktuell_az;
DebugOut.Analog[6] = Aktuell_az;//(Mess_Integral_Hoch / 512);//Aktuell_az;
DebugOut.Analog[8] = KompassValue;
DebugOut.Analog[9] = UBat;
DebugOut.Analog[11] = ErsatzKompass / GIER_GRAD_FAKTOR;
1269,7 → 1269,7
{
if(!delay--)
{
if(MessLuftdruck > 1000)
if((MessLuftdruck > 1000) && ((int)DruckOffsetSetting - ((int)ExpandBaro-10) < 256))
{
ExpandBaro -= 10;
OCR0A = DruckOffsetSetting - ExpandBaro;
1277,7 → 1277,7
delay = 250;
}
else
if(MessLuftdruck < 100)
if((MessLuftdruck < 100) && ((int)DruckOffsetSetting + 10 < ExpandBaro))
{
ExpandBaro += 10;
OCR0A = DruckOffsetSetting - ExpandBaro;
/trunk/makefile
4,8 → 4,8
F_CPU = 20000000
#-------------------------------------------------------------------
VERSION_MAJOR = 0
VERSION_MINOR = 73
VERSION_PATCH = 3
VERSION_MINOR = 74
VERSION_PATCH = 0
 
VERSION_SERIAL_MAJOR = 10 # Serial Protocol
VERSION_SERIAL_MINOR = 1 # Serial Protocol
/trunk/rc.c
65,9 → 65,9
PPM_in[index] = tmp;
}
index++;
// if(index == 5) J3High; else J3Low; // Servosignal an J3 anlegen
// if(index == 6) J4High; else J4Low; // Servosignal an J4 anlegen
// if(index == 7) J5High; else J5Low; // Servosignal an J5 anlegen
if(index == 5) J3High; else J3Low; // Servosignal an J3 anlegen
if(index == 6) J4High; else J4Low; // Servosignal an J4 anlegen
if(index == 7) J5High; else J5Low; // Servosignal an J5 anlegen
}
}
}
/trunk/timer0.c
216,6 → 216,7
 
#define MULTIPLYER 4
static int16_t ServoNickOffset = (255 / 2) * MULTIPLYER; // initial value near center positon
static int16_t ServoRollOffset = (255 / 2) * MULTIPLYER; // initial value near center positon
 
if(PlatinenVersion < 20)
{
317,7 → 318,56
ServoNickValue /= MULTIPLYER;
DebugOut.Analog[20] = ServoNickValue;
break;
case 2: // Roll Compensation Servo
ServoRollOffset = (ServoRollOffset * 3 + (int16_t) 80 * MULTIPLYER) / 4; // lowpass offset
ServoRollValue = ServoRollOffset; // offset (Range from 0 to 255 * 3 = 765)
//if(EE_Parameter.ServoRollCompInvert & 0x01)
{ // inverting movement of servo
ServoRollValue += (int16_t)( ( (int32_t) 50 * MULTIPLYER * (IntegralRoll / 128L ) ) / (256L) );
}
/* else
{ // non inverting movement of servo
ServoRollValue -= (int16_t)( ( (int32_t) 40 * MULTIPLYER * (IntegralRoll / 128L ) ) / (256L) );
}
*/ // limit servo value to its parameter range definition
if(ServoRollValue < ((int16_t)EE_Parameter.ServoNickMin * MULTIPLYER) )
{
ServoRollValue = (int16_t)EE_Parameter.ServoNickMin * MULTIPLYER;
}
else
if(ServoRollValue > ((int16_t)EE_Parameter.ServoNickMax * MULTIPLYER) )
{
ServoRollValue = (int16_t)EE_Parameter.ServoNickMax * MULTIPLYER;
}
RemainingPulse += ServoRollValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position
ServoRollValue /= MULTIPLYER;
//DebugOut.Analog[20] = ServoRollValue;
 
/* ServoRollOffset = (ServoRollOffset * 3 + (int16_t)Parameter_ServoRollControl * MULTIPLYER) / 4; // lowpass offset
ServoRollValue = ServoRollOffset; // offset (Range from 0 to 255 * 3 = 765)
if(EE_Parameter.ServoRollCompInvert & 0x01)
{ // inverting movement of servo
ServoRollValue += (int16_t)( ( (int32_t)EE_Parameter.ServoNickComp * MULTIPLYER * (IntegralNick / 128L ) ) / (256L) );
}
else
{ // non inverting movement of servo
ServoRollValue -= (int16_t)( ( (int32_t)EE_Parameter.ServoNickComp * MULTIPLYER * (IntegralNick / 128L ) ) / (256L) );
}
// limit servo value to its parameter range definition
if(ServoRollValue < ((int16_t)EE_Parameter.ServoRollMin * MULTIPLYER) )
{
ServoRollValue = (int16_t)EE_Parameter.ServoRollMin * MULTIPLYER;
}
else
if(ServoRollValue > ((int16_t)EE_Parameter.ServoRollMax * MULTIPLYER) )
{
ServoRollValue = (int16_t)EE_Parameter.ServoRollMax * MULTIPLYER;
}
RemainingPulse += ServoRollValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position
ServoRollValue /= MULTIPLYER;
//DebugOut.Analog[20] = ServoRollValue;
*/ break;
 
default: // other servo channels
RemainingPulse += 2 * PPM_in[ServoIndex]; // add channel value, factor of 2 because timer 1 increments 3.2µs
break;
/trunk/version.txt
245,4 → 245,8
- Revision der MixerTabelle eingeführt
- MixerTabelle wird bei Parameterreset neu initialisiert
- Motortest auf [12] erweitert
- Motorschalter nicht mehr 3-Stufig
- Motorschalter nicht mehr 3-Stufig
 
0.74a
- Datenfusion im Flug auch, wenn ACC-Z < 512
- Wert für die Messbereichserweiterung abgefangen