mixer: minor refactoring to reduce header include dependencies

- avoid including <px4_defines.h> from the math headers
- avoid driver include <drivers/drv_mixer.h> from the mixer
This commit is contained in:
Beat Küng
2018-12-13 09:50:07 +01:00
parent 8bcf54688a
commit c659d2bcc2
20 changed files with 60 additions and 45 deletions
-25
View File
@@ -71,31 +71,6 @@
/** reset (clear) the mixer configuration */
#define MIXERIOCRESET _MIXERIOC(1)
/** simple channel scaler */
struct mixer_scaler_s {
float negative_scale;
float positive_scale;
float offset;
float min_output;
float max_output;
};
/** mixer input */
struct mixer_control_s {
uint8_t control_group; /**< group from which the input reads */
uint8_t control_index; /**< index within the control group */
struct mixer_scaler_s scaler; /**< scaling applied to the input before use */
};
/** simple mixer */
struct mixer_simple_s {
uint8_t control_count; /**< number of inputs */
struct mixer_scaler_s output_scaler; /**< scaling for the output */
struct mixer_control_s controls[0]; /**< actual size of the array is set by control_count */
};
#define MIXER_SIMPLE_SIZE(_icount) (sizeof(struct mixer_simple_s) + (_icount) * sizeof(struct mixer_control_s))
/**
* add a simple mixer in (struct mixer_simple_s *)arg
*/
+1
View File
@@ -59,6 +59,7 @@
#include <uORB/topics/parameter_update.h>
#include <drivers/drv_hrt.h>
#include <drivers/drv_mixer.h>
#include <drivers/drv_pwm_output.h>
#include "uavcan_module.hpp"