Rev 2120 | Rev 2150 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2120 | Rev 2148 | ||
---|---|---|---|
Line 163... | Line 163... | ||
163 | 163 | ||
164 | //------------------------------------------------------ |
164 | //------------------------------------------------------ |
165 | void UpdateSPI_Buffer(void) |
165 | void UpdateSPI_Buffer(void) |
166 | { |
166 | { |
167 | signed int tmp; |
167 | signed int tmp; |
168 | static unsigned char motorindex; |
168 | static unsigned char motorindex, oldcommand = 255; |
169 | ToNaviCtrl.IntegralNick = (int) (IntegralNick / (long)(EE_Parameter.GyroAccFaktor * 4)); |
169 | ToNaviCtrl.IntegralNick = (int) (IntegralNick / (long)(EE_Parameter.GyroAccFaktor * 4)); |
170 | ToNaviCtrl.IntegralRoll = (int) (IntegralRoll / (long)(EE_Parameter.GyroAccFaktor * 4)); |
170 | ToNaviCtrl.IntegralRoll = (int) (IntegralRoll / (long)(EE_Parameter.GyroAccFaktor * 4)); |
171 | ToNaviCtrl.GyroCompass = (10 * ErsatzKompass) / GIER_GRAD_FAKTOR; |
171 | ToNaviCtrl.GyroCompass = (10 * ErsatzKompass) / GIER_GRAD_FAKTOR; |
172 | ToNaviCtrl.GyroGier = (signed int) AdNeutralGier - AdWertGier; |
172 | ToNaviCtrl.GyroGier = (signed int) AdNeutralGier - AdWertGier; |
Line 290... | Line 290... | ||
290 | break; |
290 | break; |
291 | } |
291 | } |
Line 292... | Line 292... | ||
292 | 292 | ||
293 | if(SPI_RxDataValid) |
293 | if(SPI_RxDataValid) |
294 | { |
294 | { |
- | 295 | if(FromNaviCtrl.Command != oldcommand) NaviDataOkay = 250; |
|
295 | NaviDataOkay = 250; |
296 | oldcommand = FromNaviCtrl.Command; |
296 | CalculateCompassTimer = 1; |
297 | CalculateCompassTimer = 1; |
297 | if(abs(FromNaviCtrl.GPS_Nick) < 512 && abs(FromNaviCtrl.GPS_Roll) < 512 && (EE_Parameter.GlobalConfig & CFG_GPS_AKTIV)) |
298 | if(abs(FromNaviCtrl.GPS_Nick) < 512 && abs(FromNaviCtrl.GPS_Roll) < 512 && (EE_Parameter.GlobalConfig & CFG_GPS_AKTIV)) |
298 | { |
299 | { |
299 | GPS_Nick = FromNaviCtrl.GPS_Nick; |
300 | GPS_Nick = FromNaviCtrl.GPS_Nick; |