aboutsummaryrefslogtreecommitdiff
path: root/apps/drivers/drv_mixer.h
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2012-08-05 13:43:16 -0700
committerpx4dev <px4@purgatory.org>2012-08-05 14:13:34 -0700
commit9804447a66391a1e216068cbd849e0011c851f7a (patch)
tree290375f61f5fcab6a837f39e45e65cb5fbce3308 /apps/drivers/drv_mixer.h
parent9804776a0c8bd67d4a533e3302f1a598c35b868b (diff)
downloadpx4-firmware-9804447a66391a1e216068cbd849e0011c851f7a.tar.gz
px4-firmware-9804447a66391a1e216068cbd849e0011c851f7a.tar.bz2
px4-firmware-9804447a66391a1e216068cbd849e0011c851f7a.zip
More work on the mixer architecture.
Solve the multiple publishers issue with 'control groups', one group per controller. Mixer inputs now specify both group and control offset within the group. Avoid using %f when loading/saving mixers; use scaled integers instead.
Diffstat (limited to 'apps/drivers/drv_mixer.h')
-rw-r--r--apps/drivers/drv_mixer.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/drivers/drv_mixer.h b/apps/drivers/drv_mixer.h
index f3a39e60c..d66fbf3a9 100644
--- a/apps/drivers/drv_mixer.h
+++ b/apps/drivers/drv_mixer.h
@@ -32,7 +32,9 @@
****************************************************************************/
/**
- * @file Mixer ioctl interface.
+ * @file drv_mixer.h
+ *
+ * Mixer ioctl interface.
*
* This interface can/should be exported by any device that supports
* control -> actuator mixing.
@@ -52,16 +54,15 @@
* Note that the mixers array is not actually an array of mixers; it
* simply represents the first mixer in the buffer.
*/
-struct MixInfo
-{
+struct MixInfo {
unsigned num_controls;
- struct MixMixer mixer;
+ struct mixer_s mixer;
};
/**
* Handy macro for determining the allocation size of a MixInfo structure.
*/
-#define MIXINFO_SIZE(_num_controls) (sizeof(struct MixInfo) + ((_num_controls) * sizeof(struct MixScaler)))
+#define MIXINFO_SIZE(_num_controls) (sizeof(struct MixInfo) + ((_num_controls) * sizeof(struct scaler_s)))
/*
* ioctl() definitions
@@ -86,7 +87,7 @@ struct MixInfo
#define MIXERIOCGETMIXER(_mixer) _MIXERIOC(0x20 + _mixer)
/**
- * Copy a mixer from *(struct MixMixer *)arg to the device.
+ * Copy a mixer from *(struct mixer_s *)arg to the device.
*
* If arg is zero, the mixer is deleted.
*/