Merge branch 'hil_range_fix' into paul_estimator_numeric

This commit is contained in:
Lorenz Meier 2014-03-23 14:39:22 +01:00
commit c93967f39d
2 changed files with 4 additions and 3 deletions

View File

@ -10,6 +10,7 @@ mavlink start -r 10000 -d /dev/ttyACM0
mavlink stream -d /dev/ttyACM0 -s NAMED_VALUE_FLOAT -r 10
mavlink stream -d /dev/ttyACM0 -s OPTICAL_FLOW -r 10
mavlink stream -d /dev/ttyACM0 -s ATTITUDE_CONTROLS -r 30
mavlink stream -d /dev/ttyACM0 -s SERVO_OUTPUT_RAW_0 -r 10
# Exit shell to make it available to MAVLink
exit
exit

View File

@ -811,8 +811,8 @@ protected:
for (unsigned i = 0; i < 8; i++) {
if (i < n) {
if (mavlink_base_mode & MAV_MODE_FLAG_SAFETY_ARMED) {
/* scale fake PWM out 900..1200 us to 0..1*/
out[i] = (act->output[i] - 900.0f) / 1200.0f;
/* scale fake PWM out 900..2100 us to -1..1*/
out[i] = (act->output[i] - 1500.0f) / 600.0f;
} else {
/* send 0 when disarmed */