mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 00:23:33 +08:00
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:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user