Add an ioctl for fetching the number of PWM outputs

This commit is contained in:
px4dev
2013-01-26 12:27:42 -08:00
parent b20c050402
commit 984e68d76e
2 changed files with 7 additions and 0 deletions

View File

@@ -974,6 +974,10 @@ PX4IO::ioctl(file *filep, int cmd, unsigned long arg)
}
break;
case PWM_SERVO_GET_COUNT:
*(unsigned *)arg = _max_actuators;
break;
case PWM_SERVO_SET(0) ... PWM_SERVO_SET(PWM_OUTPUT_MAX_CHANNELS): {
unsigned channel = cmd - PWM_SERVO_SET(0);