Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 543 → Rev 544

/trunk/main.h
36,7 → 36,7
// 18 = S
 
#ifndef FOLLOW_ME
#define FC_SPI_COMPATIBLE 68 // <------------------
#define FC_SPI_COMPATIBLE 69 // <------------------
#else
#define FC_SPI_COMPATIBLE 0xFF
#endif
170,7 → 170,8
u8 LowVoltageWarning;
u8 NaviAngleLimitation;
u8 NaviPH_LoginTime;
u8 OrientationAngle;
u8 OrientationAngle; // where is front - in 15°
u8 CamOrientation; // direction of the camera in 15°
u8 GlobalConfig;
u8 ExtraConfig;
u8 ComingHomeAltitude;
/trunk/spi_slave.c
355,7 → 355,8
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 + (3*360) - (FC.FromFC_CompassOffset / 10 + GeoMagDec/10 + Parameter.OrientationAngle * 15)) % 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
if(CAM_Orientation.Azimuth != -1) ToFlightCtrl.Param.sInt[4] = (CAM_Orientation.Azimuth + (3*360) - (FC.FromFC_CompassOffset / 10 + GeoMagDec/10 + Parameter.CamOrientation * 15)) % 360; // the FC uses the uncorrected comnpass value
else CAM_Orientation.Azimuth = -1;
CAM_Orientation.UpdateMask &= ~CAM_UPDATE_AZIMUTH;
}
764,6 → 765,7
Parameter.DescendRange = FromFlightCtrl.Param.Byte[6];
Parameter.MaximumAltitude = FromFlightCtrl.Param.Byte[7];
FlugMinutenGesamt = FromFlightCtrl.Param.Int[4]; // 8 & 9
Parameter.CamOrientation = FromFlightCtrl.Param.Byte[10];
break;
 
case SPI_FCCMD_VERSION:
/trunk/waypoints.c
769,7 → 769,8
 
GPSPos_Copy(&GPSData.Position, &(WP.Position));
// set heading
WP.Heading = CompassSetpointCorrected/10 + Parameter.OrientationAngle * 15;
// WP.Heading = CompassSetpointCorrected/10 + Parameter.OrientationAngle * 15;
WP.Heading = CompassSetpointCorrected/10 + Parameter.CamOrientation * 15;
if(WP.Heading == 0) WP.Heading = 360;
WP.ToleranceRadius = 120; // 12m
WP.HoldTime = 2;