Subversion Repositories FlightCtrl

Rev

Rev 708 | Rev 710 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 708 Rev 709
Line 158... Line 158...
158
void UpdateSPI_Buffer(void)
158
void UpdateSPI_Buffer(void)
159
{
159
{
160
  static unsigned char i =0;
160
  static unsigned char i =0;
161
  cli();
161
  cli();
162
  ToNaviCtrl_Value.Command = SPI_CMD_VALUE;
162
  ToNaviCtrl_Value.Command = SPI_CMD_VALUE;
163
  ToNaviCtrl_Value.IntegralNick = (int) (IntegralNick >> 4);
163
  ToNaviCtrl_Value.IntegralNick = (int) ( IntegralNick / 1024);
164
  ToNaviCtrl_Value.IntegralRoll = (int) (IntegralRoll >> 4);
164
  ToNaviCtrl_Value.IntegralRoll = (int) (IntegralRoll / 1024);
165
  ToNaviCtrl_Value.StickNick = 4;
165
  ToNaviCtrl_Value.StickNick = 4;
166
  ToNaviCtrl_Value.StickRoll = 5;//(char) StickRoll;
166
  ToNaviCtrl_Value.StickRoll = 5;//(char) StickRoll;
167
  ToNaviCtrl_Value.StickGier = 6;//(char) StickGier;
167
  ToNaviCtrl_Value.StickGier = 6;//(char) StickGier;
-
 
168
  ToNaviCtrl_Value.User1 = EE_Parameter.UserParam1;
-
 
169
  ToNaviCtrl_Value.User2 = EE_Parameter.UserParam2;
-
 
170
  ToNaviCtrl_Value.User3 = EE_Parameter.UserParam3;
-
 
171
  ToNaviCtrl_Value.User4 = EE_Parameter.UserParam4;
-
 
172
  ToNaviCtrl_Value.User5 = EE_Parameter.UserParam5;
-
 
173
  ToNaviCtrl_Value.User6 = EE_Parameter.UserParam6;
-
 
174
  ToNaviCtrl_Value.User7 = EE_Parameter.UserParam7;
-
 
175
  ToNaviCtrl_Value.User8 = EE_Parameter.UserParam8;
168
  sei();
176
  sei();
Line 169... Line 177...
169
 
177
 
170
DebugOut.Analog[30] = FromNaviCtrl_Value.GPS_Nick;
178
  DebugOut.Analog[30] = FromNaviCtrl_Value.GPS_Nick;
-
 
179
  DebugOut.Analog[31] = FromNaviCtrl_Value.GPS_Roll;
-
 
180
  KompassValue = FromNaviCtrl_Value.CompassValue;
171
DebugOut.Analog[31] = FromNaviCtrl_Value.GPS_Roll;
181
  KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180;
Line 172... Line 182...
172
}
182
}