Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2749 → Rev 2750

/trunk/fc.c
175,6 → 175,7
unsigned char Parameter_MaximumAltitude;
unsigned char Parameter_Servo3,Parameter_Servo4,Parameter_Servo5;
unsigned char CareFree = 0;
 
const signed char sintab[31] = { 0, 2, 4, 6, 7, 8, 8, 8, 7, 6, 4, 2, 0, -2, -4, -6, -7, -8, -8, -8, -7, -6, -4, -2, 0, 2, 4, 6, 7, 8, 8}; // 15° steps
 
int MaxStickNick = 0,MaxStickRoll = 0;
241,9 → 242,10
//DebugOut.Analog[16] = Variance;
//DebugOut.Analog[17] = VarioMeter;
//DebugOut.Analog[16] = GasIsZeroCnt;
//DebugOut.Analog[18] = HoehenWertF;
//DebugOut.Analog[25] = Parameter_Hoehe_P;
//DebugOut.Analog[26] = Parameter_Luftdruck_D;
DebugOut.Analog[16] = FromNC_Laser_cm;
DebugOut.Analog[17] = HoehenWertF;
}
 
 
563,9 → 565,10
void Mittelwert(void)
//############################################################################
{
static signed long tmpl,tmpl2,tmpl3,tmpl4;
static signed long tmpl,tmpl2,tmpl3,tmpl4, laser_alt_correct = 0;
static signed int oldNick, oldRoll, d2Roll, d2Nick;
signed long winkel_nick, winkel_roll;
static unsigned char laser_correct_interval;
MesswertGier = (signed int) AdNeutralGier - AdWertGier;
MesswertNick = (signed int) AdWertNickFilter / 8;
MesswertRoll = (signed int) AdWertRollFilter / 8;
580,10 → 583,24
NaviCntAcc++;
 
//++++++++++++++++++++++++++++++++++++++++++++++++
HoehenWert = HoehenWert_Mess;
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
HoehenWertF = HoehenWertF_Mess;
HoehenWert = HoehenWert_Mess + laser_alt_correct;
HoehenWertF = HoehenWertF_Mess + laser_alt_correct;
DebugOut.Analog[26] = Parameter_UserParam8;
if(FromNC_Laser_cm > 80 && FromNC_Laser_cm < 60000 && !laser_correct_interval--)
{
signed long diff;
diff = FromNC_Laser_cm - HoehenWertF;
LIMIT_MIN_MAX(diff,-300,300);
diff = (diff * Parameter_UserParam8) / 2048;
laser_alt_correct += diff;
DebugOut.Analog[18] = laser_alt_correct;
laser_correct_interval = 100;
ToNC_LaserAltCorrect_dm = laser_alt_correct / 10;
}
#else
HoehenWert = HoehenWert_Mess;
HoehenWertF = HoehenWert;
#endif
//++++++++++++++++++++++++++++++++++++++++++++++++
/trunk/libfc1284.a
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/spi.c
46,7 → 46,8
unsigned char NCParachute = 0;
unsigned char BaroCalState = 0;
unsigned char FlyzonePointCnt = 0;
unsigned int FromNC_Laser_cm;
unsigned int FromNC_Laser_cm = 0;
signed int ToNC_LaserAltCorrect_dm = 0;
unsigned int TrigLogging_CountExternal = 0;
unsigned char FromNcBaudrateIndex = 8;
unsigned char NMEA_In_Fix_Character = 0;
295,7 → 296,7
ToNaviCtrl.Param.Byte[9] = EE_Parameter.NaviWindCorrection;
ToNaviCtrl.Param.Byte[10] = EE_Parameter.NaviAccCompensation;
ToNaviCtrl.Param.Byte[11] = EE_Parameter.NaviAngleLimitation;
 
ToNaviCtrl.Param.sInt[6] = ToNC_LaserAltCorrect_dm; // 12 & 13
slow_command++;
break;
case 2:
527,6 → 528,7
if(Parameter_ExternalControl < 128 || (!ExternalControl.Config & EC_VALID)) ExternalControl.Config = 0;
else ExternalControlTimeout = EXTRN_CTRL_TIMEOUT;
}
FromNC_Laser_cm = FromNaviCtrl.Param.Int[8];
//++++++++++++++++++++++++++++++++++++++++++++
break;
case SPI_NCCMD_VERSION:
/trunk/spi.h
256,6 → 256,7
extern unsigned char FromNcBaudrateIndex;
extern unsigned char GPS_TimeHours, GPS_TimeMinutes, GPS_TimeSeconds;
extern unsigned char NMEA_In_Fix_Character;
extern signed int ToNC_LaserAltCorrect_dm;
#else
 
 
/trunk/version.txt
924,6 → 924,9
2.21c (24.10.2018)
- Delete all settings if using Parameterset 6
 
2.21e (15.11.2018)
- Altitude correction by Laser altimeter -> follows the terrrain
 
toDo:
- CalAthmospheare nachführen