aboutsummaryrefslogtreecommitdiff
path: root/apps/sensors/sensors.cpp
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2012-12-29 11:00:15 +0100
committerLorenz Meier <lm@inf.ethz.ch>2012-12-29 11:00:15 +0100
commitc652f718c0d2ab78fd80f503d5932ecf526136a9 (patch)
tree763656259754c8c786ae1577643eecf7d895d9b7 /apps/sensors/sensors.cpp
parentbe85589e48cdc1b297bffe8e492cd7d69f949b4b (diff)
downloadpx4-firmware-c652f718c0d2ab78fd80f503d5932ecf526136a9.tar.gz
px4-firmware-c652f718c0d2ab78fd80f503d5932ecf526136a9.tar.bz2
px4-firmware-c652f718c0d2ab78fd80f503d5932ecf526136a9.zip
Minor fixes, pushing WIP
Diffstat (limited to 'apps/sensors/sensors.cpp')
-rw-r--r--apps/sensors/sensors.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/apps/sensors/sensors.cpp b/apps/sensors/sensors.cpp
index 10d25d347..c331ec3e3 100644
--- a/apps/sensors/sensors.cpp
+++ b/apps/sensors/sensors.cpp
@@ -1088,24 +1088,8 @@ Sensors::ppm_poll()
manual_control.timestamp = rc_input.timestamp;
- // /* check if input needs to be de-mixed */
- // if (_parameters.rc_demix == (int)RC_DEMIX_DELTA) {
- // // XXX hardcoded for testing purposes, replace with inverted delta mixer from ROMFS
-
- // /* roll input - mixed roll and pitch channels */
- // manual_control.roll = 0.5f * (_rc.chan[_rc.function[ROLL]].scaled - _rc.chan[_rc.function[PITCH]].scaled);
- // pitch input - mixed roll and pitch channels
- // manual_control.pitch = 0.5f * (_rc.chan[_rc.function[ROLL]].scaled + _rc.chan[_rc.function[PITCH]].scaled);
- // /* yaw input - stick right is positive and positive rotation */
- // manual_control.yaw = _rc.chan[_rc.function[YAW]].scaled;
- // /* throttle input */
- // manual_control.throttle = _rc.chan[_rc.function[THROTTLE]].scaled;
-
- // /* direct pass-through of manual input */
- // } else {
-
/* roll input - rolling right is stick-wise and rotation-wise positive */
- manual_control.roll = _rc.chan[_rc.function[ROLL]].scaled;
+ manual_control.roll = limit_minus_one_to_one(_rc.chan[_rc.function[ROLL]].scaled);
/*
* pitch input - stick down is negative, but stick down is pitching up (pos) in NED,
* so reverse sign.