diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-02-24 20:24:21 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-02-24 20:24:21 +0100 |
commit | 35369471db820ba79e9803d4a48ea74ad6843e86 (patch) | |
tree | a3c5f01be5140ca6197c740d1a8dc0045820bb49 /apps/sensors/sensors.cpp | |
parent | bde6204b33bdb640e85091c1266ce362820ca7ce (diff) | |
download | px4-firmware-35369471db820ba79e9803d4a48ea74ad6843e86.tar.gz px4-firmware-35369471db820ba79e9803d4a48ea74ad6843e86.tar.bz2 px4-firmware-35369471db820ba79e9803d4a48ea74ad6843e86.zip |
working on better status reporting, removed unneeded fake PWM generation from FMU
Diffstat (limited to 'apps/sensors/sensors.cpp')
-rw-r--r-- | apps/sensors/sensors.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/apps/sensors/sensors.cpp b/apps/sensors/sensors.cpp index d8d200ea9..edff8828f 100644 --- a/apps/sensors/sensors.cpp +++ b/apps/sensors/sensors.cpp @@ -1074,36 +1074,6 @@ Sensors::adc_poll(struct sensor_combined_s &raw) void Sensors::ppm_poll() { - /* fake low-level driver, directly pulling from driver variables */ - static orb_advert_t rc_input_pub = -1; - struct rc_input_values raw; - - raw.timestamp = ppm_last_valid_decode; - /* we are accepting this message */ - _ppm_last_valid = ppm_last_valid_decode; - - /* - * relying on two decoded channels is very noise-prone, - * in particular if nothing is connected to the pins. - * requiring a minimum of four channels - */ - if (ppm_decoded_channels > 4 && hrt_absolute_time() - _ppm_last_valid < PPM_INPUT_TIMEOUT_INTERVAL) { - - for (unsigned i = 0; i < ppm_decoded_channels; i++) { - raw.values[i] = ppm_buffer[i]; - } - - raw.channel_count = ppm_decoded_channels; - - /* publish to object request broker */ - if (rc_input_pub <= 0) { - rc_input_pub = orb_advertise(ORB_ID(input_rc), &raw); - - } else { - orb_publish(ORB_ID(input_rc), rc_input_pub, &raw); - } - } - /* read low-level values from FMU or IO RC inputs (PPM, Spektrum, S.Bus) */ bool rc_updated; |