mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 23:05:19 +03:00
fix for pwm preload (not possible with this firmware, reported by marcin)
added gimbal flags to mixer. allows making gimbal tilt only or pantilt or disabling all pan/tilt by aux3/4 git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@149 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
8f80611324
commit
f3a4e9f731
7 changed files with 2483 additions and 2441 deletions
11
src/mixer.c
11
src/mixer.c
|
@ -232,8 +232,15 @@ void mixTable(void)
|
|||
|
||||
// do camstab
|
||||
if (feature(FEATURE_SERVO_TILT)) {
|
||||
servo[0] = cfg.gimbal_pitch_mid + rcData[AUX3] - cfg.midrc;
|
||||
servo[1] = cfg.gimbal_roll_mid + rcData[AUX4] - cfg.midrc;
|
||||
uint16_t aux[2] = { 0, 0 };
|
||||
|
||||
if ((cfg.gimbal_flags & GIMBAL_NORMAL) || (cfg.gimbal_flags & GIMBAL_TILTONLY))
|
||||
aux[0] = rcData[AUX3];
|
||||
if (!(cfg.gimbal_flags & GIMBAL_DISABLEAUX34))
|
||||
aux[1] = rcData[AUX4];
|
||||
|
||||
servo[0] = cfg.gimbal_pitch_mid + aux[0] - cfg.midrc;
|
||||
servo[1] = cfg.gimbal_roll_mid + aux[1] - cfg.midrc;
|
||||
|
||||
if (rcOptions[BOXCAMSTAB]) {
|
||||
servo[0] += cfg.gimbal_pitch_gain * angle[PITCH] / 16;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue