Rev 1949 | Rev 2008 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1949 | Rev 1972 | ||
---|---|---|---|
Line 22... | Line 22... | ||
22 | 22 | ||
23 | unsigned char SPI_CommandSequence[] = {SPI_FCCMD_STICK, SPI_FCCMD_USER, SPI_FCCMD_PARAMETER1, SPI_FCCMD_STICK, SPI_FCCMD_MISC, SPI_FCCMD_VERSION, SPI_FCCMD_STICK, SPI_FCCMD_SERVOS, SPI_FCCMD_ACCU}; |
23 | unsigned char SPI_CommandSequence[] = {SPI_FCCMD_STICK, SPI_FCCMD_USER, SPI_FCCMD_PARAMETER1, SPI_FCCMD_STICK, SPI_FCCMD_MISC, SPI_FCCMD_VERSION, SPI_FCCMD_STICK, SPI_FCCMD_SERVOS, SPI_FCCMD_ACCU}; |
24 | unsigned char SPI_CommandCounter = 0; |
24 | unsigned char SPI_CommandCounter = 0; |
25 | unsigned char NC_ErrorCode = 0; |
25 | unsigned char NC_ErrorCode = 0; |
- | 26 | unsigned char NC_GPS_ModeCharacter = ' '; |
|
- | 27 | unsigned char EarthMagneticField = 0; |
|
26 | unsigned char NC_GPS_ModeCharacter = ' '; |
28 | unsigned char EarthMagneticInclination = 0, EarthMagneticInclinationTheoretic = 0; |
27 | signed int POI_KameraNick = 0; // in 0,1° |
29 | signed int POI_KameraNick = 0; // in 0,1° |
Line 28... | Line 30... | ||
28 | vector16_t MagVec = {0,0,0}; |
30 | vector16_t MagVec = {0,0,0}; |
Line 335... | Line 337... | ||
335 | DebugOut.Status[0] |= FromNaviCtrl.Param.Byte[5]; |
337 | DebugOut.Status[0] |= FromNaviCtrl.Param.Byte[5]; |
336 | DebugOut.Status[1] = (DebugOut.Status[1] & (0x01|0x02)) | (FromNaviCtrl.Param.Byte[6] & (0x04 | 0x08)); |
338 | DebugOut.Status[1] = (DebugOut.Status[1] & (0x01|0x02)) | (FromNaviCtrl.Param.Byte[6] & (0x04 | 0x08)); |
337 | NC_ErrorCode = FromNaviCtrl.Param.Byte[7]; |
339 | NC_ErrorCode = FromNaviCtrl.Param.Byte[7]; |
338 | NC_GPS_ModeCharacter = FromNaviCtrl.Param.Byte[8]; |
340 | NC_GPS_ModeCharacter = FromNaviCtrl.Param.Byte[8]; |
339 | FromNaviCtrl_Value.SerialDataOkay = FromNaviCtrl.Param.Byte[9]; |
341 | FromNaviCtrl_Value.SerialDataOkay = FromNaviCtrl.Param.Byte[9]; |
- | 342 | // = FromNaviCtrl.Param.Byte[10]; |
|
- | 343 | // = FromNaviCtrl.Param.Byte[11]; |
|
340 | break; |
344 | break; |
341 | case SPI_NCCMD_GPSINFO: |
345 | case SPI_NCCMD_GPSINFO: |
342 | GPSInfo.Flags = FromNaviCtrl.Param.Byte[0]; |
346 | GPSInfo.Flags = FromNaviCtrl.Param.Byte[0]; |
343 | GPSInfo.NumOfSats = FromNaviCtrl.Param.Byte[1]; |
347 | GPSInfo.NumOfSats = FromNaviCtrl.Param.Byte[1]; |
344 | GPSInfo.SatFix = FromNaviCtrl.Param.Byte[2]; |
348 | GPSInfo.SatFix = FromNaviCtrl.Param.Byte[2]; |
Line 347... | Line 351... | ||
347 | GPSInfo.HomeBearing = FromNaviCtrl.Param.sInt[3]; |
351 | GPSInfo.HomeBearing = FromNaviCtrl.Param.sInt[3]; |
348 | PPM_in[25] = (signed char) FromNaviCtrl.Param.Byte[8]; // WP_EVENT-Channel-Value |
352 | PPM_in[25] = (signed char) FromNaviCtrl.Param.Byte[8]; // WP_EVENT-Channel-Value |
349 | FromNC_AltitudeSpeed = FromNaviCtrl.Param.Byte[9]; |
353 | FromNC_AltitudeSpeed = FromNaviCtrl.Param.Byte[9]; |
350 | FromNC_AltitudeSetpoint = (long) FromNaviCtrl.Param.sInt[5] * 10; // in cm |
354 | FromNC_AltitudeSetpoint = (long) FromNaviCtrl.Param.sInt[5] * 10; // in cm |
351 | break; |
355 | break; |
- | 356 | case SPI_MISC: |
|
- | 357 | EarthMagneticField = FromNaviCtrl.Param.Byte[0]; |
|
- | 358 | EarthMagneticInclination = FromNaviCtrl.Param.Byte[1]; |
|
- | 359 | EarthMagneticInclinationTheoretic = FromNaviCtrl.Param.Byte[2]; |
|
- | 360 | break; |
|
- | 361 | ||
352 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
362 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
353 | case SPI_NCCMD_HOTT_DATA: |
363 | case SPI_NCCMD_HOTT_DATA: |
354 | if(EE_Parameter.Receiver == RECEIVER_HOTT) NC_Fills_HoTT_Telemety(); |
364 | if(EE_Parameter.Receiver == RECEIVER_HOTT) NC_Fills_HoTT_Telemety(); |
355 | break; |
365 | break; |
356 | #endif |
366 | #endif |