Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 539 → Rev 540

/trunk/main.c
614,13 → 614,15
{
if(FromFC_LoadWP_List & 0x80)// -> load relative
{
u32 angle;
angle = (360 + GyroCompassCorrected/10 + Parameter.OrientationAngle * 15) % 360;
if(NCFlags & NC_FLAG_FREE || NaviData.TargetPositionDeviation.Distance > 7*10)
{ // take actual position
if(!PointList_Move(1,&(GPSData.Position),NaviData.CompassHeading)) PointList_Clear(); // try to move wp-list so that 1st entry matches the current position
if(!PointList_Move(1,&(GPSData.Position),angle)) PointList_Clear(); // try to move wp-list so that 1st entry matches the current position
}
else
{ // take last target position
if(!PointList_Move(1, &(NaviData.TargetPosition),NaviData.CompassHeading)) PointList_Clear(); // try to move wp-list so that 1st entry matches the current position
if(!PointList_Move(1, &(NaviData.TargetPosition),angle)) PointList_Clear(); // try to move wp-list so that 1st entry matches the current position
}
}
if(FC.StatusFlags & FC_STATUS_FLY) PointList_WPActive(TRUE);
/trunk/main.h
14,7 → 14,7
 
#define VERSION_MAJOR 2
#define VERSION_MINOR 6
#define VERSION_PATCH 1
#define VERSION_PATCH 2
// 0 = A
// 1 = B
// 2 = C
/trunk/spi_slave.c
355,7 → 355,7
ToFlightCtrl.Param.Byte[7] = GPS_Aid_StickMultiplikator;
if(CAM_Orientation.UpdateMask & CAM_UPDATE_AZIMUTH)
{
if(CAM_Orientation.Azimuth != -1) ToFlightCtrl.Param.sInt[4] = (CAM_Orientation.Azimuth + 720 - (FC.FromFC_CompassOffset / 10 + GeoMagDec/10)) % 360; // the FC uses the uncorrected comnpass value
if(CAM_Orientation.Azimuth != -1) ToFlightCtrl.Param.sInt[4] = (CAM_Orientation.Azimuth + (3*360) - (FC.FromFC_CompassOffset / 10 + GeoMagDec/10 + Parameter.OrientationAngle * 15)) % 360; // the FC uses the uncorrected comnpass value
else CAM_Orientation.Azimuth = -1;
CAM_Orientation.UpdateMask &= ~CAM_UPDATE_AZIMUTH;
}
/trunk/waypoints.c
665,7 → 665,7
if(value[len-1] == '\r')
{
value[len-1] = 0;
len--;
// len--;
}
}
if(len > listnamelen) len = listnamelen;
769,7 → 769,7
 
GPSPos_Copy(&GPSData.Position, &(WP.Position));
// set heading
WP.Heading = CompassSetpointCorrected/10;
WP.Heading = CompassSetpointCorrected/10 + Parameter.OrientationAngle * 15;
if(WP.Heading == 0) WP.Heading = 360;
WP.ToleranceRadius = 120; // 12m
WP.HoldTime = 2;