Subversion Repositories FlightCtrl

Rev

Rev 819 | Rev 825 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 819 Rev 823
Line 47... Line 47...
47
 
47
 
48
#define SLAVE_SELECT_DDR_PORT   DDRC
48
#define SLAVE_SELECT_DDR_PORT   DDRC
49
#define SLAVE_SELECT_PORT       PORTC
49
#define SLAVE_SELECT_PORT       PORTC
Line -... Line 50...
-
 
50
#define SPI_SLAVE_SELECT        PC5
-
 
51
 
-
 
52
 
-
 
53
#define SPI_CMD_USER        10
50
#define SPI_SLAVE_SELECT        PC5
54
#define SPI_CMD_STICK       11
51
 
55
#define SPI_CMD_CAL_COMPASS 12
52
struct str_ToNaviCtrl_Value
56
struct str_ToNaviCtrl
53
{
57
{
54
 unsigned char Sync1, Sync2;
58
 unsigned char Sync1, Sync2;
55
 unsigned char Command;
59
 unsigned char Command;
56
 signed int  IntegralNick;
60
 signed int  IntegralNick;
57
 signed int  IntegralRoll;
61
 signed int  IntegralRoll;
58
 signed int  AccNick;
-
 
59
 signed int  AccRoll;
62
 signed int  AccNick;
-
 
63
 signed int  AccRoll;
60
 char StickNick,StickRoll, StickGier, StickGas;
64
 signed int  GyroCompass;
61
 signed int  GyroCompass;
65
 signed int  GyroNick;
-
 
66
 signed int  GyroRoll;
-
 
67
 signed int  GyroGier;
-
 
68
 union  
-
 
69
 { char Byte[12];
-
 
70
   int  Int[6];
-
 
71
   long Long[3];
62
 unsigned char User1, User2, User3, User4, User5, User6, User7;//, User8;
72
   float Float[3];
63
 unsigned char CalState;
73
 } Param;
Line 64... Line 74...
64
 unsigned char Chksum;
74
 unsigned char Chksum;
65
};
-
 
66
 
75
};
67
 struct str_ToNaviCtrl_Version
-
 
68
 {
-
 
69
  unsigned char Sync1, Sync2;
-
 
70
  unsigned char Command;
-
 
71
  unsigned char  HVersion;
76
 
72
  unsigned char  NVersion;
-
 
73
  unsigned char  Comp;
-
 
74
  unsigned char  ActualSettingNo;
-
 
75
  unsigned char  MinimumSatNo;
-
 
76
  unsigned char  d1;
-
 
77
  signed int  d2;
-
 
78
  signed int  d3;
-
 
79
  signed int  d4;
-
 
80
  signed int  d5;
-
 
81
  signed int  d6;
-
 
82
  signed int  d7;
-
 
83
  unsigned char Chksum;
77
#define SPI_CMD_OSD_DATA         100
84
 };
78
#define SPI_CMD_GPS_POS          101
85
 
79
#define SPI_CMD_GPS_TARGET   102 
86
struct str_FromNaviCtrl_Value
80
struct str_FromNaviCtrl
87
{
81
{
88
 unsigned char Command;
82
 unsigned char Command;
89
  signed int  GPS_Nick;
-
 
90
  signed int  GPS_Roll;
83
  signed int  GPS_Nick;
91
  signed int  GPS_Gier;
84
  signed int  GPS_Roll;
92
  signed int  GPS_Height;
85
  signed int  GPS_Gier;
-
 
86
  signed int  CompassValue;
93
  signed int  CompassValue;
87
  signed int  Status;
94
  signed int  Status;
88
  unsigned char BeepTime;
95
  unsigned char BeepTime;
89
  union  
96
  unsigned char OsdBar;
90
  { char Byte[12];
97
  signed int  Distance;
91
    int  Int[6];
98
  signed int  d2;
92
    long Long[3];
99
  signed int  d3;
93
    float Float[3];
Line 100... Line -...
100
  signed int  d4;
-
 
101
  unsigned char Chksum;
-
 
102
};
-
 
103
 
-
 
104
 struct str_FromNaviCtrl_Version
-
 
105
 {
-
 
106
  unsigned char Command;
-
 
107
  unsigned char  HVersion;
-
 
108
  unsigned char  NVersion;
-
 
109
  unsigned char  Comp;
-
 
110
  unsigned char  d0;
-
 
111
  signed int  d1;
-
 
112
  signed int  d2;
-
 
113
  signed int  d3;
-
 
114
  signed int  d4;
-
 
115
  signed int  d5;
-
 
Line 116... Line 94...
116
  signed int  d6;
94
  } Param;
117
  signed int  d7;
-
 
118
  unsigned char Chksum;
-
 
Line 119... Line 95...
119
 };
95
  unsigned char Chksum;
120
 
96
};
Line 121... Line -...
121
#ifdef USE_SPI_COMMUNICATION
-
 
122
extern struct str_ToNaviCtrl_Version   ToNaviCtrl_Version;
97
 
Line 123... Line 98...
123
extern struct str_FromNaviCtrl_Version   FromNaviCtrl_Version;
98
 
124
 
99
#ifdef USE_SPI_COMMUNICATION
125
extern struct str_ToNaviCtrl_Value   ToNaviCtrl_Value;
100
 
126
extern struct str_FromNaviCtrl_Value   FromNaviCtrl_Value;
101
extern struct str_ToNaviCtrl   ToNaviCtrl;
127
 
102
extern struct str_FromNaviCtrl FromNaviCtrl;