From 899fbcc7cf13fbcdfb371663fef7782dd9ea1456 Mon Sep 17 00:00:00 2001 From: px4dev Date: Sat, 26 Jan 2013 13:14:52 -0800 Subject: Fix cut and paste so that we send direct PWM and read back servo values from the right pages. --- apps/drivers/px4io/px4io.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/drivers/px4io/px4io.cpp') diff --git a/apps/drivers/px4io/px4io.cpp b/apps/drivers/px4io/px4io.cpp index 61c9a793d..257b15685 100644 --- a/apps/drivers/px4io/px4io.cpp +++ b/apps/drivers/px4io/px4io.cpp @@ -985,7 +985,7 @@ PX4IO::ioctl(file *filep, int cmd, unsigned long arg) ret = -EINVAL; } else { /* send a direct PWM value */ - ret = io_reg_set(PX4IO_PAGE_SERVOS, channel, arg); + ret = io_reg_set(PX4IO_PAGE_DIRECT_PWM, channel, arg); } break; @@ -999,7 +999,7 @@ PX4IO::ioctl(file *filep, int cmd, unsigned long arg) ret = -EINVAL; } else { /* fetch a current PWM value */ - uint32_t value = io_reg_get(PX4IO_PAGE_DIRECT_PWM, channel); + uint32_t value = io_reg_get(PX4IO_PAGE_SERVOS, channel); if (value == _io_reg_get_error) { ret = -EIO; } else { -- cgit v1.2.3