Rev 136 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 136 | Rev 143 | ||
---|---|---|---|
Line 5... | Line 5... | ||
5 | volatile unsigned char UpdateMotor = 0; |
5 | volatile unsigned char UpdateMotor = 0; |
6 | volatile unsigned int cntKompass = 0; |
6 | volatile unsigned int cntKompass = 0; |
7 | volatile unsigned int beeptime = 0; |
7 | volatile unsigned int beeptime = 0; |
8 | int ServoValue = 0; |
8 | int ServoValue = 0; |
9 | //Salvo 8.9.2007 |
9 | //Salvo 8.9.2007 |
10 | volatile unsigned int Kompass_Neuer_Wert= 0; |
10 | volatile uint8_t Kompass_Neuer_Wert= 0; |
11 | volatile unsigned int Kompass_Value_Old = 0; |
11 | volatile unsigned int Kompass_Value_Old = 0; |
12 | // Salvo End |
12 | // Salvo End |
13 | enum { |
13 | enum { |
14 | STOP = 0, |
14 | STOP = 0, |
15 | CK = 1, |
15 | CK = 1, |
Line 141... | Line 141... | ||
141 | else ServoValue -= ((long) EE_Parameter.ServoNickComp * (IntegralNick / 128)) / 512; |
141 | else ServoValue -= ((long) EE_Parameter.ServoNickComp * (IntegralNick / 128)) / 512; |
Line 142... | Line 142... | ||
142 | 142 | ||
143 | if(ServoValue < EE_Parameter.ServoNickMin) ServoValue = EE_Parameter.ServoNickMin; |
143 | if(ServoValue < EE_Parameter.ServoNickMin) ServoValue = EE_Parameter.ServoNickMin; |
Line 144... | Line 144... | ||
144 | else if(ServoValue > EE_Parameter.ServoNickMax) ServoValue = EE_Parameter.ServoNickMax; |
144 | else if(ServoValue > EE_Parameter.ServoNickMax) ServoValue = EE_Parameter.ServoNickMax; |
145 | 145 | ||
146 | DebugOut.Analog[10] = ServoValue; |
146 | // DebugOut.Analog[10] = ServoValue; |
147 | OCR2A = ServoValue;// + 75; |
147 | OCR2A = ServoValue;// + 75; |
148 | timer = EE_Parameter.ServoNickRefresh; |
148 | timer = EE_Parameter.ServoNickRefresh; |
149 | } |
149 | } |