34 #include "rosflight.h" 103 int16_t off_pwm = 1000;
124 else if (value < 0.0)
143 else if (value < -1.0)
163 float max_output = 1.0f;
199 float scale_factor = 1.0;
200 if (max_output > 1.0)
202 scale_factor = 1.0 / max_output;
virtual void pwm_init(uint32_t refresh_rate, uint16_t idle_pwm)=0
uint32_t default_pwm_rate
float raw_outputs_[NUM_TOTAL_OUTPUTS]
void log(CommLinkInterface::LogSeverity severity, const char *fmt,...)
CommManager comm_manager_
void set_new_aux_command(aux_command_t new_aux_command)
void param_change_callback(uint16_t param_id) override
float get_param_float(uint16_t id) const
Get the value of a floating point parameter by id.
void write_servo(uint8_t index, float value)
virtual void pwm_write(uint8_t channel, float value)=0
const State & state() const
float y[NUM_MIXER_OUTPUTS]
void set_error(uint16_t error)
output_type_t output_type[NUM_MIXER_OUTPUTS]
void clear_error(uint16_t error)
static constexpr uint8_t NUM_TOTAL_OUTPUTS
aux_channel_t channel[NUM_TOTAL_OUTPUTS]
float x[NUM_MIXER_OUTPUTS]
const Output & output() const
float outputs_[NUM_TOTAL_OUTPUTS]
int get_param_int(uint16_t id) const
Get the value of an integer parameter by id.
static constexpr uint8_t NUM_MIXER_OUTPUTS
const mixer_t * array_of_mixers_[NUM_MIXERS]
const mixer_t * mixer_to_use_
StateManager state_manager_
void write_motor(uint8_t index, float value)
output_type_t combined_output_type_[NUM_TOTAL_OUTPUTS]
float F[NUM_MIXER_OUTPUTS]
float z[NUM_MIXER_OUTPUTS]
aux_command_t aux_command_