Rev 1837 | Rev 1848 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1837 | Rev 1840 | ||
---|---|---|---|
Line 198... | Line 198... | ||
198 | sinus = sintab[EE_Parameter.CamOrientation]; |
198 | sinus = sintab[EE_Parameter.CamOrientation]; |
Line 199... | Line 199... | ||
199 | 199 | ||
200 | if(CalculateServoSignals == 1) |
200 | if(CalculateServoSignals == 1) |
201 | { |
201 | { |
- | 202 | nick = (cosinus * IntegralNick) / 128L - (sinus * IntegralRoll) / 128L; |
|
- | 203 | ||
- | 204 | //POI_KameraNick = 450; |
|
- | 205 | nick -= POI_KameraNick * 7; |
|
- | 206 | DebugOut.Analog[16] = POI_KameraNick; |
|
202 | nick = (cosinus * IntegralNick) / 128L - (sinus * IntegralRoll) / 128L; |
207 | |
203 | nick = ((long)EE_Parameter.ServoNickComp * nick) / 512L; |
208 | nick = ((long)EE_Parameter.ServoNickComp * nick) / 512L; |
204 | ServoNickOffset += ((int16_t)Parameter_ServoNickControl * (MULTIPLYER*16) - ServoNickOffset) / EE_Parameter.ServoManualControlSpeed; |
209 | ServoNickOffset += ((int16_t)Parameter_ServoNickControl * (MULTIPLYER*16) - ServoNickOffset) / EE_Parameter.ServoManualControlSpeed; |
- | 210 | ServoNickValue = ServoNickOffset / 16; // offset (Range from 0 to 255 * 3 = 765) |
|
205 | ServoNickValue = ServoNickOffset / 16; // offset (Range from 0 to 255 * 3 = 765) |
211 | |
206 | if(EE_Parameter.ServoCompInvert & 0x01) |
212 | if(EE_Parameter.ServoCompInvert & 0x01) |
207 | { // inverting movement of servo |
213 | { // inverting movement of servo |
208 | ServoNickValue += nick;//(int16_t)( ( (int32_t)EE_Parameter.ServoNickComp * nick) / (256L) ); |
214 | ServoNickValue += nick;//(int16_t)( ( (int32_t)EE_Parameter.ServoNickComp * nick) / (256L) ); |
209 | } |
215 | } |