diff options
author | Anton Matosov <anton.matosov@gmail.com> | 2015-03-03 22:30:52 -0800 |
---|---|---|
committer | Anton Matosov <anton.matosov@gmail.com> | 2015-03-06 18:57:37 -0800 |
commit | 3db6d08b5c3de15db8af75dc3608c204e8be525c (patch) | |
tree | d2e1fba5c3c71af496455d702d3a0b2de184325d | |
parent | db6ad147d562f2fc8ef493062854d68f58140da7 (diff) | |
download | px4-firmware-3db6d08b5c3de15db8af75dc3608c204e8be525c.tar.gz px4-firmware-3db6d08b5c3de15db8af75dc3608c204e8be525c.tar.bz2 px4-firmware-3db6d08b5c3de15db8af75dc3608c204e8be525c.zip |
Enabled attitude compensation by default as that is all the gimbal driver is about
-rw-r--r-- | src/drivers/gimbal/gimbal.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/drivers/gimbal/gimbal.cpp b/src/drivers/gimbal/gimbal.cpp index b4f24cceb..6a9398698 100644 --- a/src/drivers/gimbal/gimbal.cpp +++ b/src/drivers/gimbal/gimbal.cpp @@ -168,7 +168,7 @@ Gimbal::Gimbal() : CDev("Gimbal", GIMBAL_DEVICE_PATH), _vehicle_command_sub(-1), _att_sub(-1), - _attitude_compensation(false), + _attitude_compensation(true), _initialized(false), _actuator_controls_2_topic(-1), _sample_perf(perf_alloc(PC_ELAPSED, "gimbal_read")), @@ -238,7 +238,6 @@ Gimbal::read(struct file *filp, char *buffer, size_t buflen) void Gimbal::start() { - /* schedule a cycle to start things */ work_queue(LPWORK, &_work, (worker_t)&Gimbal::cycle_trampoline, this, 1); } @@ -260,7 +259,6 @@ Gimbal::cycle_trampoline(void *arg) void Gimbal::cycle() { - if (!_initialized) { /* get a subscription handle on the vehicle command topic */ _vehicle_command_sub = orb_subscribe(ORB_ID(vehicle_command)); @@ -299,7 +297,6 @@ Gimbal::cycle() pitch = -att.pitch; updated = true; - } struct vehicle_command_s cmd; @@ -312,7 +309,7 @@ Gimbal::cycle() orb_copy(ORB_ID(vehicle_command), _vehicle_command_sub, &cmd); - //debug("cmd: %d, param1: %8.4f param2: %8.4f", (double)cmd.command, (double)cmd.param1, (double)cmd.param2); + debug("cmd: %d, param7 %d | param1: %8.4f param2: %8.4f", cmd.command, (int)cmd.param7, (double)cmd.param1, (double)cmd.param2); if (cmd.command == VEHICLE_CMD_DO_MOUNT_CONTROL && equal(cmd.param7, VEHICLE_MOUNT_MODE_MAVLINK_TARGETING)) { |