Subversion Repositories NaviCtrl

Rev

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

Rev 864 Rev 865
Line 152... Line 152...
152
s16 FromFlightCtrl_AccNick = 0,FromFlightCtrl_AccRoll = 0,FromFlightCtrl_GyroNick = 0,FromFlightCtrl_GyroRoll = 0;
152
s16 FromFlightCtrl_AccNick = 0,FromFlightCtrl_AccRoll = 0,FromFlightCtrl_GyroNick = 0,FromFlightCtrl_GyroRoll = 0;
153
str_HugeBlockFromFC HugeBlockFromFC;
153
str_HugeBlockFromFC HugeBlockFromFC;
154
str_HugeBlockToFC HugeBlockToFC;
154
str_HugeBlockToFC HugeBlockToFC;
155
u8 CamCtrlCharacter =' ';
155
u8 CamCtrlCharacter =' ';
Line 156... Line 156...
156
 
156
 
157
s16     NickServoValue;
157
s16     NickServoValue = 128 * 64;;
158
s16     FromFC_ServoRollControl = 128;
158
s16     FromFC_ServoRollControl = 128;
Line 159... Line 159...
159
s16     FromFC_ServoNickControl = 128;
159
s16     FromFC_ServoNickControl = 128;
160
 
160
 
Line 307... Line 307...
307
void SPI0_Init(void)
307
void SPI0_Init(void)
308
{
308
{
309
        GPIO_InitTypeDef GPIO_InitStructure;
309
        GPIO_InitTypeDef GPIO_InitStructure;
310
        SSP_InitTypeDef   SSP_InitStructure;
310
        SSP_InitTypeDef   SSP_InitStructure;
Line 311... Line 311...
311
 
311
 
Line 312... Line 312...
312
        UART1_PutString("\r\n SPI init...");
312
//      UART1_PutString("\r\n SPI init...");
313
 
313
 
Line 314... Line 314...
314
        SCU_APBPeriphClockConfig(__GPIO2 ,ENABLE);
314
        SCU_APBPeriphClockConfig(__GPIO2 ,ENABLE);
Line 360... Line 360...
360
        VIC_ITCmd(SSP0_ITLine, ENABLE);
360
        VIC_ITCmd(SSP0_ITLine, ENABLE);
Line 361... Line 361...
361
 
361
 
362
        SPI0_Timeout = SetDelay(4*SPI0_TIMEOUT);
362
        SPI0_Timeout = SetDelay(4*SPI0_TIMEOUT);
363
        EE_Parameter.Revision = 0;
363
        EE_Parameter.Revision = 0;
364
        sprintf(EE_Parameter.Name,"???%c",0);
364
        sprintf(EE_Parameter.Name,"???%c",0);
365
        UART1_PutString("ok");
365
//      UART1_PutString("ok");
Line 366... Line 366...
366
}
366
}
367
 
367
 
Line 439... Line 439...
439
                                ToFlightCtrl.Param.Byte[3]      = (u8) Kalman_Kompass;
439
                                ToFlightCtrl.Param.Byte[3]      = (u8) Kalman_Kompass;
440
                                ToFlightCtrl.Param.Byte[4] = 0; // siehe bitcodiert unten
440
                                ToFlightCtrl.Param.Byte[4] = 0; // siehe bitcodiert unten
441
                                if(DebugUART == UART2) ToFlightCtrl.Param.Byte[4] = KM_BIT_UART; // informs the FC to listen to the UART
441
                                if(DebugUART == UART2) ToFlightCtrl.Param.Byte[4] = KM_BIT_UART; // informs the FC to listen to the UART
442
                                if(IO1_Function == IO1FUNC_PARACHUTE)
442
                                if(IO1_Function == IO1FUNC_PARACHUTE)
443
                                {
443
                                {
444
                                  if(ToFC_Parachute_Off > 5)    ToFlightCtrl.Param.Byte[4] |= KM_BIT_SLOW; // informs the FC to listen to the UART
444
                                  if(ToFC_Parachute_Off > 5)    ToFlightCtrl.Param.Byte[4] |= KM_BIT_SLOW;
445
                                  if(ToFC_Parachute_Off > 300)  ToFlightCtrl.Param.Byte[4] |= KM_BIT_OFF;  // informs the FC to listen to the UART
445
                                  if(ToFC_Parachute_Off > 300)  ToFlightCtrl.Param.Byte[4] |= KM_BIT_OFF;  
446
                                }
446
                                }
447
                                ToFlightCtrl.Param.Byte[5] = (s8) ToFC_Rotate_C;
447
                                ToFlightCtrl.Param.Byte[5] = (s8) ToFC_Rotate_C;
448
                                ToFlightCtrl.Param.Byte[6] = (s8) ToFC_Rotate_S;
448
                                ToFlightCtrl.Param.Byte[6] = (s8) ToFC_Rotate_S;
449
                                ToFlightCtrl.Param.Byte[7] = GPS_Aid_StickMultiplikator;
449
                                ToFlightCtrl.Param.Byte[7] = GPS_Aid_StickMultiplikator;
450
                                if(CAM_Orientation.UpdateMask & CAM_UPDATE_AZIMUTH)
450
                                if(CAM_Orientation.UpdateMask & CAM_UPDATE_AZIMUTH)
Line 1029... Line 1029...
1029
                                if(UART_VersionInfo.HWMajor >= 30) NaviData_Volatile.ShutterCounter = TrigLogging.Count;
1029
                                if(UART_VersionInfo.HWMajor >= 30) NaviData_Volatile.ShutterCounter = TrigLogging.Count;
1030
                                else                    NaviData_Volatile.ShutterCounter = FromFlightCtrl.Param.Int[3];   // 6 & 7
1030
                                else                    NaviData_Volatile.ShutterCounter = FromFlightCtrl.Param.Int[3];   // 6 & 7
1031
                                LowVoltageLandingActive = FromFlightCtrl.Param.Byte[8];
1031
                                LowVoltageLandingActive = FromFlightCtrl.Param.Byte[8];
1032
                                Parameter.FailSafeTime = FromFlightCtrl.Param.Byte[9];
1032
                                Parameter.FailSafeTime = FromFlightCtrl.Param.Byte[9];
1033
                                FromFC_ExternalCtrlCfg = FromFlightCtrl.Param.Byte[10];
1033
                                FromFC_ExternalCtrlCfg = FromFlightCtrl.Param.Byte[10];
1034
// DebugOut.Analog[] = NaviData_Volatile.ShutterCounter;
1034
                                FromFC_ExternalCtrlSwitch = FromFlightCtrl.Param.Byte[11];
1035
// 8
-
 
1036
// 9
-
 
1037
// 10
-
 
1038
// 11
-
 
1039
                                break;
1035
                                break;
Line 1040... Line 1036...
1040
 
1036
 
1041
                        default:
1037
                        default:
1042
                                break;
1038
                                break;