aboutsummaryrefslogtreecommitdiff
path: root/src/modules/px4iofirmware/mixer.cpp
diff options
context:
space:
mode:
authorJulian Oes <julian@oes.ch>2013-10-07 18:03:05 +0200
committerJulian Oes <julian@oes.ch>2013-10-07 18:03:05 +0200
commit19879432ad6cf709af25192401829719defd2983 (patch)
tree567bda3cb54df9c177ac1d2e47ece0c30ba03bce /src/modules/px4iofirmware/mixer.cpp
parent03edf901617c5f5785ef7d78d8fa74e2bfdd45fc (diff)
downloadpx4-firmware-19879432ad6cf709af25192401829719defd2983.tar.gz
px4-firmware-19879432ad6cf709af25192401829719defd2983.tar.bz2
px4-firmware-19879432ad6cf709af25192401829719defd2983.zip
Trying to get rid of magic PWM numbers
Diffstat (limited to 'src/modules/px4iofirmware/mixer.cpp')
-rw-r--r--src/modules/px4iofirmware/mixer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/px4iofirmware/mixer.cpp b/src/modules/px4iofirmware/mixer.cpp
index 350b93488..352b93e85 100644
--- a/src/modules/px4iofirmware/mixer.cpp
+++ b/src/modules/px4iofirmware/mixer.cpp
@@ -242,8 +242,8 @@ mixer_tick(void)
case ESC_RAMP:
r_page_servos[i] = (outputs[i]
- * (ramp_promille*r_page_servo_control_max[i] + (1000-ramp_promille)*2100 - ramp_promille*r_page_servo_control_min[i] - (1000-ramp_promille)*900)/2/1000
- + (ramp_promille*r_page_servo_control_max[i] + (1000-ramp_promille)*2100 + ramp_promille*r_page_servo_control_min[i] + (1000-ramp_promille)*900)/2/1000);
+ * (ramp_promille*r_page_servo_control_max[i] + (1000-ramp_promille)*PWM_MAX - ramp_promille*r_page_servo_control_min[i] - (1000-ramp_promille)*PWM_MIN)/2/1000
+ + (ramp_promille*r_page_servo_control_max[i] + (1000-ramp_promille)*PWM_MAX + ramp_promille*r_page_servo_control_min[i] + (1000-ramp_promille)*PWM_MIN)/2/1000);
break;
case ESC_ON: