Rev 819 | Rev 846 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 819 | Rev 823 | ||
---|---|---|---|
1 | // ######################## SPI - FlightCtrl ################### |
1 | // ######################## SPI - FlightCtrl ################### |
2 | #include "main.h" |
2 | #include "main.h" |
3 | 3 | ||
4 | 4 | ||
5 | struct str_ToNaviCtrl_Version ToNaviCtrl_Version; |
5 | //struct str_ToNaviCtrl_Version ToNaviCtrl_Version; |
6 | struct str_FromNaviCtrl_Version FromNaviCtrl_Version; |
6 | //struct str_FromNaviCtrl_Version FromNaviCtrl_Version; |
7 | struct str_ToNaviCtrl_Value ToNaviCtrl_Value; |
7 | struct str_ToNaviCtrl ToNaviCtrl; |
8 | struct str_FromNaviCtrl_Value FromNaviCtrl_Value; |
8 | struct str_FromNaviCtrl FromNaviCtrl; |
9 | 9 | ||
10 | unsigned char SPI_BufferIndex; |
10 | unsigned char SPI_BufferIndex; |
11 | unsigned char SPI_RxBufferIndex; |
11 | unsigned char SPI_RxBufferIndex; |
12 | 12 | ||
13 | volatile unsigned char SPI_Buffer[sizeof(FromNaviCtrl_Value) + 8]; |
13 | volatile unsigned char SPI_Buffer[sizeof(FromNaviCtrl) + 8]; |
14 | unsigned char *SPI_TX_Buffer, *ToNaviCtrl_Chksum; |
14 | unsigned char *SPI_TX_Buffer; |
15 | 15 | ||
16 | unsigned char SPITransferCompleted, SPI_ChkSum; |
16 | unsigned char SPITransferCompleted, SPI_ChkSum; |
17 | unsigned char SPI_RxDataValid; |
17 | unsigned char SPI_RxDataValid; |
- | 18 | ||
- | 19 | unsigned char SPI_CommandSequence[] = { SPI_CMD_USER, SPI_CMD_STICK, SPI_CMD_USER, SPI_CMD_STICK, SPI_CMD_CAL_COMPASS }; |
|
- | 20 | unsigned char SPI_CommandCounter = 0; |
|
18 | 21 | ||
19 | #ifdef USE_SPI_COMMUNICATION |
22 | #ifdef USE_SPI_COMMUNICATION |
20 | 23 | ||
21 | //------------------------------------------------------ |
24 | //------------------------------------------------------ |
22 | void SPI_MasterInit(void) |
25 | void SPI_MasterInit(void) |
23 | { |
26 | { |
24 | DDR_SPI |= (1<<DD_MOSI)|(1<<DD_SCK); // Set MOSI and SCK output, all others input |
27 | DDR_SPI |= (1<<DD_MOSI)|(1<<DD_SCK); // Set MOSI and SCK output, all others input |
25 | SLAVE_SELECT_DDR_PORT |= (1 << SPI_SLAVE_SELECT); |
28 | SLAVE_SELECT_DDR_PORT |= (1 << SPI_SLAVE_SELECT); |
26 | 29 | ||
27 | SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR1)|(0<<SPR0)|(0<<SPIE); // Enable SPI, Master, set clock rate fck/64 |
30 | SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR1)|(0<<SPR0)|(0<<SPIE); // Enable SPI, Master, set clock rate fck/64 |
28 | SPSR = 0;//(1<<SPI2X); |
31 | SPSR = 0;//(1<<SPI2X); |
29 | 32 | ||
30 | SLAVE_SELECT_PORT |= (1 << SPI_SLAVE_SELECT); |
33 | SLAVE_SELECT_PORT |= (1 << SPI_SLAVE_SELECT); |
31 | SPITransferCompleted = 1; |
34 | SPITransferCompleted = 1; |
32 | 35 | ||
33 | //SPDR = 0x00; // dummy write |
36 | //SPDR = 0x00; // dummy write |
34 | 37 | ||
35 | ToNaviCtrl_Value.Sync1 = 0xAA; |
38 | ToNaviCtrl.Sync1 = 0xAA; |
36 | ToNaviCtrl_Value.Sync2 = 0x83; |
39 | ToNaviCtrl.Sync2 = 0x83; |
37 | 40 | ||
38 | ToNaviCtrl_Value.Command = SPI_CMD_VALUE; |
41 | ToNaviCtrl.Command = SPI_CMD_USER; |
39 | ToNaviCtrl_Value.IntegralNick = 0; |
- | |
40 | ToNaviCtrl_Value.IntegralRoll = 0; |
- | |
41 | ToNaviCtrl_Value.StickNick = 0; |
- | |
42 | ToNaviCtrl_Value.StickRoll = 0;//(char) StickRoll; |
- | |
43 | ToNaviCtrl_Value.StickGier = 0;//(char) StickGier; |
42 | ToNaviCtrl.IntegralNick = 0; |
44 | ToNaviCtrl_Value.CalState = 0; |
43 | ToNaviCtrl.IntegralRoll = 0; |
45 | SPI_RxDataValid = 0; |
44 | SPI_RxDataValid = 0; |
46 | } |
45 | } |
47 | 46 | ||
48 | //------------------------------------------------------ |
47 | //------------------------------------------------------ |
49 | void SPI_StartTransmitPacket(unsigned char command) |
48 | void SPI_StartTransmitPacket(void) |
50 | { |
49 | { |
51 | //if ((SLAVE_SELECT_PORT & (1 << SPI_SLAVE_SELECT)) == 0) return; // transfer of prev. packet not completed |
50 | //if ((SLAVE_SELECT_PORT & (1 << SPI_SLAVE_SELECT)) == 0) return; // transfer of prev. packet not completed |
52 | if (!SPITransferCompleted) return; |
51 | if (!SPITransferCompleted) return; |
53 | // _delay_us(30); |
52 | // _delay_us(30); |
54 | 53 | ||
55 | SLAVE_SELECT_PORT &= ~(1 << SPI_SLAVE_SELECT); // SelectSlave |
54 | SLAVE_SELECT_PORT &= ~(1 << SPI_SLAVE_SELECT); // SelectSlave |
- | 55 | SPI_TX_Buffer = (unsigned char *) &ToNaviCtrl; |
|
56 | - | ||
57 | switch(command) |
- | |
58 | { |
- | |
59 | case SPI_CMD_VERSION: SPI_TX_Buffer = (unsigned char *) &ToNaviCtrl_Version; |
56 | |
60 | ToNaviCtrl_Chksum = (unsigned char *) &ToNaviCtrl_Version.Chksum; |
- | |
61 | break; |
- | |
62 | 57 | ToNaviCtrl.Command = SPI_CommandSequence[SPI_CommandCounter++]; |
|
63 | case SPI_CMD_VALUE: SPI_TX_Buffer = (unsigned char *) &ToNaviCtrl_Value; |
- | |
64 | ToNaviCtrl_Chksum = (unsigned char *) &ToNaviCtrl_Value.Chksum; |
- | |
65 | break; |
- | |
66 | - | ||
67 | } |
- | |
68 | 58 | if (SPI_CommandCounter >= sizeof(SPI_CommandSequence)) SPI_CommandCounter = 0; |
|
69 | 59 | ||
70 | SPITransferCompleted = 0; |
60 | SPITransferCompleted = 0; |
71 | UpdateSPI_Buffer(); // update buffer |
61 | UpdateSPI_Buffer(); // update buffer |
- | 62 | ||
72 | SPI_BufferIndex = 1; |
63 | SPI_BufferIndex = 1; |
73 | //ebugOut.Analog[16]++; |
64 | //ebugOut.Analog[16]++; |
74 | // -- Debug-Output --- |
65 | // -- Debug-Output --- |
75 | //---- |
66 | //---- |
76 | asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); |
67 | asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); |
77 | asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); |
68 | asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); |
78 | asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); |
69 | asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); |
- | 70 | ToNaviCtrl.Chksum = ToNaviCtrl.Sync1; |
|
79 | SPDR = ToNaviCtrl_Value.Sync1; // Start transmission |
71 | SPDR = ToNaviCtrl.Sync1; // Start transmission |
80 | *ToNaviCtrl_Chksum = ToNaviCtrl_Value.Sync1; |
- | |
81 | // SLAVE_SELECT_PORT |= (1 << SPI_SLAVE_SELECT); // DeselectSlave |
72 | // SLAVE_SELECT_PORT |= (1 << SPI_SLAVE_SELECT); // DeselectSlave |
82 | 73 | ||
83 | } |
74 | } |
84 | 75 | ||
85 | //------------------------------------------------------ |
76 | //------------------------------------------------------ |
86 | //SIGNAL(SIG_SPI) |
77 | //SIGNAL(SIG_SPI) |
87 | void SPI_TransmitByte(void) |
78 | void SPI_TransmitByte(void) |
88 | { |
79 | { |
89 | static unsigned char SPI_RXState = 0; |
80 | static unsigned char SPI_RXState = 0; |
90 | unsigned char rxdata; |
81 | unsigned char rxdata; |
91 | static unsigned char rxchksum; |
82 | static unsigned char rxchksum; |
92 | 83 | ||
93 | if (SPITransferCompleted) return; |
84 | if (SPITransferCompleted) return; |
94 | if (!(SPSR & (1 << SPIF))) return; |
85 | if (!(SPSR & (1 << SPIF))) return; |
95 | SendSPI = 4; |
86 | SendSPI = 4; |
96 | 87 | ||
97 | // _delay_us(30); |
88 | // _delay_us(30); |
98 | SLAVE_SELECT_PORT |= (1 << SPI_SLAVE_SELECT); // DeselectSlave |
89 | SLAVE_SELECT_PORT |= (1 << SPI_SLAVE_SELECT); // DeselectSlave |
99 | 90 | ||
100 | rxdata = SPDR; |
91 | rxdata = SPDR; |
101 | switch ( SPI_RXState) |
92 | switch ( SPI_RXState) |
102 | { |
93 | { |
103 | case 0: |
94 | case 0: |
104 | 95 | ||
105 | SPI_RxBufferIndex = 0; |
96 | SPI_RxBufferIndex = 0; |
106 | //DebugOut.Analog[17]++; |
97 | //DebugOut.Analog[17]++; |
107 | rxchksum = rxdata; |
98 | rxchksum = rxdata; |
108 | if (rxdata == 0x81 ) { SPI_RXState = 1; } // 1. Syncbyte ok |
99 | if (rxdata == 0x81 ) { SPI_RXState = 1; } // 1. Syncbyte ok |
109 | 100 | ||
110 | break; |
101 | break; |
111 | 102 | ||
112 | case 1: |
103 | case 1: |
113 | if (rxdata == 0x55) { rxchksum += rxdata; SPI_RXState = 2; } // 2. Syncbyte ok |
104 | if (rxdata == 0x55) { rxchksum += rxdata; SPI_RXState = 2; } // 2. Syncbyte ok |
114 | else SPI_RXState = 0; |
105 | else SPI_RXState = 0; |
115 | //DebugOut.Analog[18]++; |
106 | //DebugOut.Analog[18]++; |
116 | break; |
107 | break; |
117 | 108 | ||
118 | case 2: |
109 | case 2: |
119 | SPI_Buffer[SPI_RxBufferIndex++]= rxdata; // get data |
110 | SPI_Buffer[SPI_RxBufferIndex++]= rxdata; // get data |
120 | //DebugOut.Analog[19]++; |
111 | //DebugOut.Analog[19]++; |
121 | if (SPI_RxBufferIndex >= sizeof(FromNaviCtrl_Value)) |
112 | if (SPI_RxBufferIndex >= sizeof(FromNaviCtrl)) |
122 | { |
113 | { |
123 | 114 | ||
124 | if (rxdata == rxchksum) |
115 | if (rxdata == rxchksum) |
125 | { |
116 | { |
126 | unsigned char *ptr = (unsigned char *)&FromNaviCtrl_Value; |
117 | unsigned char *ptr = (unsigned char *)&FromNaviCtrl; |
127 | 118 | ||
128 | memcpy(ptr, (unsigned char *) SPI_Buffer, sizeof(SPI_Buffer)); |
119 | memcpy(ptr, (unsigned char *) SPI_Buffer, sizeof(SPI_Buffer)); |
129 | 120 | ||
130 | SPI_RxDataValid = 1; |
121 | SPI_RxDataValid = 1; |
131 | } |
122 | } |
132 | else SPI_RxDataValid = 0; |
123 | else SPI_RxDataValid = 0; |
133 | 124 | ||
134 | SPI_RXState = 0; |
125 | SPI_RXState = 0; |
135 | } |
126 | } |
136 | else rxchksum += rxdata; |
127 | else rxchksum += rxdata; |
137 | break; |
128 | break; |
138 | 129 | ||
139 | } |
130 | } |
140 | 131 | ||
141 | if (SPI_BufferIndex < sizeof(ToNaviCtrl_Value)) |
132 | if (SPI_BufferIndex < sizeof(ToNaviCtrl)) |
142 | { |
133 | { |
143 | SLAVE_SELECT_PORT &= ~(1 << SPI_SLAVE_SELECT); // SelectSlave |
134 | SLAVE_SELECT_PORT &= ~(1 << SPI_SLAVE_SELECT); // SelectSlave |
144 | asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); |
135 | asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); |
145 | asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); |
136 | asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); |
146 | asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); |
137 | asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); asm volatile ("nop"); |
147 | 138 | ||
148 | SPDR = SPI_TX_Buffer[SPI_BufferIndex]; |
139 | SPDR = SPI_TX_Buffer[SPI_BufferIndex]; |
149 | *ToNaviCtrl_Chksum += SPI_TX_Buffer[SPI_BufferIndex]; |
140 | ToNaviCtrl.Chksum += SPI_TX_Buffer[SPI_BufferIndex]; |
150 | // SLAVE_SELECT_PORT |= (1 << SPI_SLAVE_SELECT); // DeselectSlave |
141 | // SLAVE_SELECT_PORT |= (1 << SPI_SLAVE_SELECT); // DeselectSlave |
151 | 142 | ||
152 | } |
143 | } |
153 | else SPITransferCompleted = 1; |
144 | else SPITransferCompleted = 1; |
154 | 145 | ||
155 | SPI_BufferIndex++; |
146 | SPI_BufferIndex++; |
156 | } |
147 | } |
157 | 148 | ||
158 | 149 | ||
159 | //------------------------------------------------------ |
150 | //------------------------------------------------------ |
160 | void UpdateSPI_Buffer(void) |
151 | void UpdateSPI_Buffer(void) |
161 | { |
152 | { |
162 | static unsigned char i =0; |
153 | static unsigned char i =0; |
163 | cli(); |
154 | cli(); |
164 | ToNaviCtrl_Value.Command = SPI_CMD_VALUE; |
- | |
- | 155 | ||
165 | ToNaviCtrl_Value.IntegralNick = (int) (IntegralNick / 1024); |
156 | ToNaviCtrl.IntegralNick = (int) (IntegralNick / 1024); |
166 | ToNaviCtrl_Value.IntegralRoll = (int) (IntegralRoll / 1024); |
157 | ToNaviCtrl.IntegralRoll = (int) (IntegralRoll / 1024); |
167 | ToNaviCtrl_Value.StickNick = (char) PPM_in[EE_Parameter.Kanalbelegung[K_NICK]]; |
- | |
168 | ToNaviCtrl_Value.StickRoll = (char) PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]]; |
- | |
169 | ToNaviCtrl_Value.StickGier = (char) PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]; |
- | |
170 | ToNaviCtrl_Value.GyroCompass = ErsatzKompass / GIER_GRAD_FAKTOR; |
158 | ToNaviCtrl.GyroCompass = ErsatzKompass / GIER_GRAD_FAKTOR; |
171 | ToNaviCtrl_Value.AccNick = (int) ACC_AMPLIFY * (NaviAccNick / NaviCntAcc); |
159 | ToNaviCtrl.AccNick = (int) ACC_AMPLIFY * (NaviAccNick / NaviCntAcc); |
172 | ToNaviCtrl_Value.AccRoll = (int) ACC_AMPLIFY * (Mittelwert_AccRoll / NaviCntAcc); |
160 | ToNaviCtrl.AccRoll = (int) ACC_AMPLIFY * (Mittelwert_AccRoll / NaviCntAcc); |
173 | NaviCntAcc = 0; NaviAccNick = 0; NaviAccRoll = 0; |
161 | NaviCntAcc = 0; NaviAccNick = 0; NaviAccRoll = 0; |
174 | ToNaviCtrl_Value.User1 = Parameter_UserParam1; |
162 | // ToNaviCtrl.User8 = Parameter_UserParam8; |
- | 163 | // ToNaviCtrl.CalState = WinkelOut.CalcState; |
|
- | 164 | ||
- | 165 | switch(ToNaviCtrl.Command) // |
|
- | 166 | { |
|
- | 167 | case SPI_CMD_USER: |
|
175 | ToNaviCtrl_Value.User2 = Parameter_UserParam2; |
168 | ToNaviCtrl.Param.Byte[0] = Parameter_UserParam1; |
176 | ToNaviCtrl_Value.User3 = Parameter_UserParam3; |
169 | ToNaviCtrl.Param.Byte[1] = Parameter_UserParam2; |
177 | ToNaviCtrl_Value.User4 = Parameter_UserParam4; |
170 | ToNaviCtrl.Param.Byte[2] = Parameter_UserParam3; |
178 | ToNaviCtrl_Value.User5 = Parameter_UserParam5; |
171 | ToNaviCtrl.Param.Byte[3] = Parameter_UserParam4; |
179 | ToNaviCtrl_Value.User6 = Parameter_UserParam6; |
172 | ToNaviCtrl.Param.Byte[4] = Parameter_UserParam5; |
180 | ToNaviCtrl_Value.User7 = Parameter_UserParam7; |
173 | ToNaviCtrl.Param.Byte[5] = Parameter_UserParam6; |
181 | // ToNaviCtrl_Value.User8 = Parameter_UserParam8; |
174 | ToNaviCtrl.Param.Byte[6] = Parameter_UserParam7; |
- | 175 | break; |
|
- | 176 | ||
- | 177 | case SPI_CMD_STICK: |
|
- | 178 | ToNaviCtrl.Param.Byte[0] = (char) PPM_in[EE_Parameter.Kanalbelegung[K_GAS]]; |
|
- | 179 | ToNaviCtrl.Param.Byte[1] = (char) PPM_in[EE_Parameter.Kanalbelegung[K_GIER]]; |
|
- | 180 | ToNaviCtrl.Param.Byte[2] = (char) PPM_in[EE_Parameter.Kanalbelegung[K_ROLL]]; |
|
- | 181 | ToNaviCtrl.Param.Byte[3] = (char) PPM_in[EE_Parameter.Kanalbelegung[K_NICK]]; |
|
- | 182 | ToNaviCtrl.Param.Byte[4] = (char) PPM_in[EE_Parameter.Kanalbelegung[K_POTI1]]; |
|
- | 183 | ToNaviCtrl.Param.Byte[5] = (char) PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]]; |
|
- | 184 | ToNaviCtrl.Param.Byte[6] = (char) PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]]; |
|
- | 185 | ToNaviCtrl.Param.Byte[7] = (char) PPM_in[EE_Parameter.Kanalbelegung[K_POTI4]]; |
|
- | 186 | ||
- | 187 | break; |
|
- | 188 | case SPI_CMD_CAL_COMPASS: |
|
182 | ToNaviCtrl_Value.CalState = WinkelOut.CalcState; |
189 | ToNaviCtrl.Param.Byte[0] = WinkelOut.CalcState; |
- | 190 | break; |
|
- | 191 | } |
|
- | 192 | ||
- | 193 | ||
183 | sei(); |
194 | sei(); |
- | 195 | ||
- | 196 | ||
184 | 197 | ||
185 | if (SPI_RxDataValid) |
198 | if (SPI_RxDataValid) |
186 | { |
199 | { |
187 | GPS_Nick = FromNaviCtrl_Value.GPS_Nick; |
200 | GPS_Nick = FromNaviCtrl.GPS_Nick; |
188 | GPS_Roll = FromNaviCtrl_Value.GPS_Roll; |
201 | GPS_Roll = FromNaviCtrl.GPS_Roll; |
189 | KompassValue = FromNaviCtrl_Value.CompassValue; |
202 | KompassValue = FromNaviCtrl.CompassValue; |
190 | KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180; |
203 | KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180; |
- | 204 | ||
- | 205 | if (FromNaviCtrl.BeepTime > beeptime) beeptime = FromNaviCtrl.BeepTime; |
|
- | 206 | ||
- | 207 | switch (FromNaviCtrl.Command) |
|
- | 208 | { |
|
- | 209 | case SPI_CMD_OSD_DATA: |
|
- | 210 | // ToFlightCtrl.Param.Byte[0] = OsdBar; |
|
- | 211 | // ToFlightCtrl.Param.Int[1] = Distance; |
|
- | 212 | break; |
|
- | 213 | ||
- | 214 | case SPI_CMD_GPS_POS: |
|
- | 215 | // ToFlightCtrl.Param.Long[0] = GPS_Data.Longitude; |
|
- | 216 | // ToFlightCtrl.Param.Long[1] = GPS_Data.Latitude; |
|
- | 217 | break; |
|
- | 218 | ||
- | 219 | case SPI_CMD_GPS_TARGET: |
|
- | 220 | // ToFlightCtrl.Param.Long[0] = GPS_Data.TargetLongitude; |
|
- | 221 | // ToFlightCtrl.Param.Long[1] = GPS_Data.TargetLatitude; |
|
- | 222 | break; |
|
- | 223 | ||
- | 224 | default: |
|
191 | 225 | break; |
|
192 | if (FromNaviCtrl_Value.BeepTime > beeptime) beeptime = FromNaviCtrl_Value.BeepTime; |
226 | } |
193 | } |
227 | } |
194 | else |
228 | else |
195 | { |
229 | { |
196 | // KompassValue = 0; |
230 | // KompassValue = 0; |
197 | // KompassRichtung = 0; |
231 | // KompassRichtung = 0; |
198 | 232 | ||
199 | GPS_Nick = 0; |
233 | GPS_Nick = 0; |
200 | GPS_Roll = 0; |
234 | GPS_Roll = 0; |
201 | } |
235 | } |
202 | } |
236 | } |
203 | 237 | ||
204 | #endif |
238 | #endif |
205 | 239 | ||
206 | 240 | ||
207 | 241 |