Subversion Repositories NaviCtrl

Rev

Rev 306 | Rev 320 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 306 Rev 319
Line 104... Line 104...
104
s32 HeadFreeStartAngle = 0;
104
s32 HeadFreeStartAngle = 0;
105
s16 FC_WP_EventChannel = 0; // gibt einen Schaltkanal an die FC weiter, wenn der Wegpunkt erreicht wurde
105
s16 FC_WP_EventChannel = 0; // gibt einen Schaltkanal an die FC weiter, wenn der Wegpunkt erreicht wurde
106
u32 ToFC_AltitudeRate = 0;
106
u32 ToFC_AltitudeRate = 0;
107
s32 ToFC_AltitudeSetpoint = 0;
107
s32 ToFC_AltitudeSetpoint = 0;
108
u8  FromFC_VarioCharacter = ' ';
108
u8  FromFC_VarioCharacter = ' ';
-
 
109
u8 DisableFC_Sticks = 0;
Line 109... Line 110...
109
 
110
 
Line 110... Line 111...
110
SPI_Version_t FC_Version;
111
SPI_Version_t FC_Version;
111
 
112
 
Line 290... Line 291...
290
                ToFlightCtrl.NCStatus = 0;
291
                ToFlightCtrl.NCStatus = 0;
291
                // cycle spi commands
292
                // cycle spi commands
292
                ToFlightCtrl.Command = SPI_CommandSequence[SPI_CommandCounter++];
293
                ToFlightCtrl.Command = SPI_CommandSequence[SPI_CommandCounter++];
293
                // restart command cycle at the end
294
                // restart command cycle at the end
294
                if (SPI_CommandCounter >= sizeof(SPI_CommandSequence)) SPI_CommandCounter = 0;
295
                if (SPI_CommandCounter >= sizeof(SPI_CommandSequence)) SPI_CommandCounter = 0;
295
 
-
 
-
 
296
#define FLAG_GPS_AID 0x01
296
                switch (ToFlightCtrl.Command)
297
                switch (ToFlightCtrl.Command)
297
                {
298
                {
298
                        case  SPI_NCCMD_KALMAN:
299
                        case  SPI_NCCMD_KALMAN:
299
                                CalcHeadFree();
300
                                CalcHeadFree();
300
                                ToFlightCtrl.Param.sByte[0] = (s8) Kalman_K;
301
                                ToFlightCtrl.Param.sByte[0] = (s8) Kalman_K;
Line 302... Line 303...
302
                                ToFlightCtrl.Param.sByte[2] = (s8) Kalman_MaxDrift;
303
                                ToFlightCtrl.Param.sByte[2] = (s8) Kalman_MaxDrift;
303
                                ToFlightCtrl.Param.Byte[3]      = (u8) SerialLinkOkay;
304
                                ToFlightCtrl.Param.Byte[3]      = (u8) SerialLinkOkay;
304
                                ToFlightCtrl.Param.sByte[4] = (s8) ToFcGpsZ;
305
                                ToFlightCtrl.Param.sByte[4] = (s8) ToFcGpsZ;
305
                                ToFlightCtrl.Param.Byte[5] = (s8) ToFC_Rotate_C;
306
                                ToFlightCtrl.Param.Byte[5] = (s8) ToFC_Rotate_C;
306
                                ToFlightCtrl.Param.Byte[6] = (s8) ToFC_Rotate_S;
307
                                ToFlightCtrl.Param.Byte[6] = (s8) ToFC_Rotate_S;
307
                //ToFlightCtrl.Param.Byte[7] = 
308
                if(DisableFC_Sticks) ToFlightCtrl.Param.Byte[7] = FLAG_GPS_AID; else ToFlightCtrl.Param.Byte[7] = 0x00;
308
                                if(CAM_Orientation.UpdateMask & CAM_UPDATE_AZIMUTH)
309
                                if(CAM_Orientation.UpdateMask & CAM_UPDATE_AZIMUTH)
309
                                {
310
                                {
310
                                        ToFlightCtrl.Param.sInt[4] = CAM_Orientation.Azimuth;
311
                                        ToFlightCtrl.Param.sInt[4] = CAM_Orientation.Azimuth;
311
                                        CAM_Orientation.UpdateMask &= ~CAM_UPDATE_AZIMUTH;
312
                                        CAM_Orientation.UpdateMask &= ~CAM_UPDATE_AZIMUTH;
312
                                }
313
                                }