diff options
author | px4dev <px4@purgatory.org> | 2013-01-14 01:09:42 -0800 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-01-14 01:09:42 -0800 |
commit | 06b66ad065f096060bfdd2e1f18cdc6704c70d2c (patch) | |
tree | 80ebbb4024505a61170b49c06e44e30e2b7a28f0 /apps/drivers | |
parent | 2dc47160f4ac3b1dbd2e81c31237459b50497ca3 (diff) | |
download | px4-firmware-06b66ad065f096060bfdd2e1f18cdc6704c70d2c.tar.gz px4-firmware-06b66ad065f096060bfdd2e1f18cdc6704c70d2c.tar.bz2 px4-firmware-06b66ad065f096060bfdd2e1f18cdc6704c70d2c.zip |
Don't advertise things we don't have anymore.
Diffstat (limited to 'apps/drivers')
-rw-r--r-- | apps/drivers/px4io/px4io.cpp | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/apps/drivers/px4io/px4io.cpp b/apps/drivers/px4io/px4io.cpp index ad372081a..968f433b2 100644 --- a/apps/drivers/px4io/px4io.cpp +++ b/apps/drivers/px4io/px4io.cpp @@ -324,24 +324,6 @@ PX4IO::task_main() _t_vstatus = orb_subscribe(ORB_ID(vehicle_status)); orb_set_interval(_t_vstatus, 200); /* 5Hz update rate max. */ - /* advertise the limited control inputs */ - memset(&_controls_effective, 0, sizeof(_controls_effective)); - _t_actuators_effective = orb_advertise(_primary_pwm_device ? ORB_ID_VEHICLE_ATTITUDE_CONTROLS_EFFECTIVE : ORB_ID(actuator_controls_1), - &_controls_effective); - - /* advertise the mixed control outputs */ - memset(&_outputs, 0, sizeof(_outputs)); - _t_outputs = orb_advertise(_primary_pwm_device ? ORB_ID_VEHICLE_CONTROLS : ORB_ID(actuator_outputs_1), - &_outputs); - - /* advertise the rc inputs */ - memset(&_input_rc, 0, sizeof(_input_rc)); - _to_input_rc = orb_advertise(ORB_ID(input_rc), &_input_rc); - - /* do not advertise the battery status until its clear that a battery is connected */ - memset(&_battery_status, 0, sizeof(_battery_status)); - _to_battery = -1; - /* poll descriptor */ pollfd fds[3]; fds[0].fd = _t_actuators; @@ -402,6 +384,20 @@ PX4IO::task_main() break; } +#if 0 + /* advertise the limited control inputs */ + memset(&_controls_effective, 0, sizeof(_controls_effective)); + _to_actuators_effective = orb_advertise(_primary_pwm_device ? ORB_ID_VEHICLE_ATTITUDE_CONTROLS_EFFECTIVE : ORB_ID(actuator_controls_1), + &_controls_effective); + + /* advertise the mixed control outputs */ + memset(&_outputs, 0, sizeof(_outputs)); + _to_outputs = orb_advertise(_primary_pwm_device ? ORB_ID_VEHICLE_CONTROLS : ORB_ID(actuator_outputs_1), + &_outputs); +#endif + + + } unlock(); |