mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 19:07:45 +08:00
Fixed the HIL actuator range to what it should be
This commit is contained in:
@@ -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 NAMED_VALUE_FLOAT -r 10
|
||||||
mavlink stream -d /dev/ttyACM0 -s OPTICAL_FLOW -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 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 shell to make it available to MAVLink
|
||||||
exit
|
exit
|
||||||
|
|||||||
@@ -811,8 +811,8 @@ protected:
|
|||||||
for (unsigned i = 0; i < 8; i++) {
|
for (unsigned i = 0; i < 8; i++) {
|
||||||
if (i < n) {
|
if (i < n) {
|
||||||
if (mavlink_base_mode & MAV_MODE_FLAG_SAFETY_ARMED) {
|
if (mavlink_base_mode & MAV_MODE_FLAG_SAFETY_ARMED) {
|
||||||
/* scale fake PWM out 900..1200 us to 0..1*/
|
/* scale fake PWM out 900..2100 us to -1..1*/
|
||||||
out[i] = (act->output[i] - 900.0f) / 1200.0f;
|
out[i] = (act->output[i] - 1500.0f) / 600.0f;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* send 0 when disarmed */
|
/* send 0 when disarmed */
|
||||||
|
|||||||
Reference in New Issue
Block a user