PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Library for output limiting (PWM for example) More...
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Classes | |
struct | output_limit_t |
Macros | |
#define | INIT_TIME_US 50000 |
#define | RAMP_TIME_US 500000 |
Enumerations | |
enum | output_limit_state { OUTPUT_LIMIT_STATE_OFF = 0, OUTPUT_LIMIT_STATE_INIT, OUTPUT_LIMIT_STATE_RAMP, OUTPUT_LIMIT_STATE_ON } |
Functions | |
__EXPORT void | output_limit_init (output_limit_t *limit) |
__EXPORT void | output_limit_calc (const bool armed, const bool pre_armed, const unsigned num_channels, const uint16_t reverse_mask, const uint16_t *disarmed_output, const uint16_t *min_output, const uint16_t *max_output, const float *output, uint16_t *effective_output, output_limit_t *limit) |
Library for output limiting (PWM for example)
Definition in file output_limit.h.
#define INIT_TIME_US 50000 |
Definition at line 53 of file output_limit.h.
Referenced by MixerTest::mixerTest(), and output_limit_calc().
#define RAMP_TIME_US 500000 |
Definition at line 57 of file output_limit.h.
Referenced by MixerTest::mixerTest(), and output_limit_calc().
enum output_limit_state |
Enumerator | |
---|---|
OUTPUT_LIMIT_STATE_OFF | |
OUTPUT_LIMIT_STATE_INIT | |
OUTPUT_LIMIT_STATE_RAMP | |
OUTPUT_LIMIT_STATE_ON |
Definition at line 59 of file output_limit.h.
__EXPORT void output_limit_calc | ( | const bool | armed, |
const bool | pre_armed, | ||
const unsigned | num_channels, | ||
const uint16_t | reverse_mask, | ||
const uint16_t * | disarmed_output, | ||
const uint16_t * | min_output, | ||
const uint16_t * | max_output, | ||
const float * | output, | ||
uint16_t * | effective_output, | ||
output_limit_t * | limit | ||
) |
Definition at line 51 of file output_limit.cpp.
References disarmed, hrt_absolute_time(), hrt_abstime, hrt_elapsed_time(), INIT_TIME_US, OUTPUT_LIMIT_STATE_INIT, OUTPUT_LIMIT_STATE_OFF, OUTPUT_LIMIT_STATE_ON, OUTPUT_LIMIT_STATE_RAMP, PROGRESS_INT_SCALING, RAMP_TIME_US, output_limit_t::ramp_up, output_limit_t::state, and output_limit_t::time_armed.
Referenced by mixer_tick(), MixerTest::mixerTest(), linux_pwm_out::task_main(), snapdragon_pwm::task_main(), and MixingOutput::update().
__EXPORT void output_limit_init | ( | output_limit_t * | limit | ) |
Definition at line 44 of file output_limit.cpp.
References OUTPUT_LIMIT_STATE_INIT, output_limit_t::ramp_up, output_limit_t::state, and output_limit_t::time_armed.
Referenced by MixerTest::mixerTest(), MixingOutput::MixingOutput(), linux_pwm_out::task_main(), snapdragon_pwm::task_main(), and user_start().