Subversion Repositories FlightCtrl

Rev

Rev 685 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 685 Rev 701
Line 23... Line 23...
23
 
23
 
24
  ToNaviCtrl.Sync1 = 0x81;
24
  ToNaviCtrl.Sync1 = 0x81;
Line 25... Line 25...
25
  ToNaviCtrl.Sync2 = 0x55;
25
  ToNaviCtrl.Sync2 = 0x55;
26
 
26
 
27
  ToNaviCtrl.Comp = 12;
27
  ToNaviCtrl.Comp = 12;
28
  ToNaviCtrl.IntegralNick = 12345;
28
  ToNaviCtrl.IntegralPitch = 12345;
29
  ToNaviCtrl.IntegralRoll = 56789;
29
  ToNaviCtrl.IntegralRoll = 56789;
30
  ToNaviCtrl.StickNick = 100;
30
  ToNaviCtrl.StickPitch = 100;
Line 31... Line 31...
31
  ToNaviCtrl.StickRoll = 150;//(char) StickRoll;
31
  ToNaviCtrl.StickRoll = 150;//(char) StickRoll;
Line 32... Line 32...
32
  ToNaviCtrl.StickGier = 200;//(char) StickGier;
32
  ToNaviCtrl.StickYaw = 200;//(char) StickYaw;
33
 
33
 
Line 45... Line 45...
45
   UpdateSPI_Buffer();                              // update buffer
45
   UpdateSPI_Buffer();                              // update buffer
46
   SPI_BufferIndex = 1;
46
   SPI_BufferIndex = 1;
47
   DebugOut.Analog[16]++;
47
   DebugOut.Analog[16]++;
48
   // -- Debug-Output ---
48
   // -- Debug-Output ---
49
/*         DebugOut.Analog[20] = FromNaviCtrl.Comp;
49
/*         DebugOut.Analog[20] = FromNaviCtrl.Comp;
50
       DebugOut.Analog[21] = FromNaviCtrl.GPS_Nick;
50
       DebugOut.Analog[21] = FromNaviCtrl.GPS_Pitch;
51
       DebugOut.Analog[22] = FromNaviCtrl.GPS_Roll;
51
       DebugOut.Analog[22] = FromNaviCtrl.GPS_Roll;
52
       DebugOut.Analog[23] = FromNaviCtrl.CompassValue;
52
       DebugOut.Analog[23] = FromNaviCtrl.CompassHeading;
53
*/
53
*/
54
   //----
54
   //----
55
   SPDR = ToNaviCtrl.Sync1;                  // Start transmission
55
   SPDR = ToNaviCtrl.Sync1;                  // Start transmission
56
   ToNaviCtrl.ChkSum = ToNaviCtrl.Sync1;
56
   ToNaviCtrl.ChkSum = ToNaviCtrl.Sync1;
57
}
57
}
Line 98... Line 98...
98
void UpdateSPI_Buffer(void)
98
void UpdateSPI_Buffer(void)
99
{
99
{
100
  /*static unsigned char i =0;
100
  /*static unsigned char i =0;
101
  cli();
101
  cli();
102
  ToNaviCtrl.Comp = SPI_PROTOCOL_COMP;
102
  ToNaviCtrl.Comp = SPI_PROTOCOL_COMP;
103
  ToNaviCtrl.IntegralNick = (int) (IntegralNick >> 4);
103
  ToNaviCtrl.IntegralPitch = (int) (IntegralPitch >> 4);
104
  ToNaviCtrl.IntegralRoll = (int) (IntegralRoll >> 4);
104
  ToNaviCtrl.IntegralRoll = (int) (IntegralRoll >> 4);
105
  ToNaviCtrl.StickNick = 4;
105
  ToNaviCtrl.StickPitch = 4;
106
  ToNaviCtrl.StickRoll = 5;//(char) StickRoll;
106
  ToNaviCtrl.StickRoll = 5;//(char) StickRoll;
107
  ToNaviCtrl.StickGier = 6;//(char) StickGier;
107
  ToNaviCtrl.StickYaw = 6;//(char) StickYaw;
108
  sei();
108
  sei();
109
  */
109
  */
110
}
110
}
Line 111... Line 111...
111
 
111