Rev 1155 | Rev 1166 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1155 | Rev 1156 | ||
---|---|---|---|
Line 152... | Line 152... | ||
152 | StickGier = 0; PPM_in[K_GAS] = 0;StickRoll = 0; StickNick = 0; |
152 | StickGier = 0; PPM_in[K_GAS] = 0;StickRoll = 0; StickNick = 0; |
153 | if(PlatinenVersion >= 20) GIER_GRAD_FAKTOR = 1160; else GIER_GRAD_FAKTOR = 1291; // unterschiedlich für ME und ENC |
153 | if(PlatinenVersion >= 20) GIER_GRAD_FAKTOR = 1160; else GIER_GRAD_FAKTOR = 1291; // unterschiedlich für ME und ENC |
154 | ROT_OFF; |
154 | ROT_OFF; |
Line 155... | Line 155... | ||
155 | 155 | ||
- | 156 | Timer_Init(); |
|
156 | Timer_Init(); |
157 | TIMER2_Init(); |
157 | UART_Init(); |
158 | UART_Init(); |
158 | rc_sum_init(); |
159 | rc_sum_init(); |
159 | ADC_Init(); |
160 | ADC_Init(); |
160 | i2c_init(); |
161 | i2c_init(); |
Line 237... | Line 238... | ||
237 | WinkelOut.Orientation = 1; |
238 | WinkelOut.Orientation = 1; |
238 | while (1) |
239 | while (1) |
239 | { |
240 | { |
240 | if(UpdateMotor && AdReady) // ReglerIntervall |
241 | if(UpdateMotor && AdReady) // ReglerIntervall |
241 | { |
242 | { |
242 | J3High; |
243 | //J3High; |
243 | UpdateMotor=0; |
244 | UpdateMotor=0; |
244 | if(WinkelOut.CalcState) CalMk3Mag(); |
245 | if(WinkelOut.CalcState) CalMk3Mag(); |
245 | else MotorRegler(); |
246 | else MotorRegler(); |
246 | SendMotorData(); |
247 | SendMotorData(); |
247 | ROT_OFF; |
248 | ROT_OFF; |
248 | J3Low; |
249 | //J3Low; |
249 | if(PcZugriff) PcZugriff--; |
250 | if(PcZugriff) PcZugriff--; |
250 | else |
251 | else |
251 | { |
252 | { |
252 | ExternControl.Config = 0; |
253 | ExternControl.Config = 0; |
253 | ExternStickNick = 0; |
254 | ExternStickNick = 0; |