PX4 Firmware
PX4 Autopilot Software http://px4.io
output_limit.h File Reference

Library for output limiting (PWM for example) More...

#include <stdint.h>
#include <stdbool.h>
Include dependency graph for output_limit.h:
This graph shows which files directly or indirectly include this file:

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)
 

Detailed Description

Library for output limiting (PWM for example)

Author
Julian Oes julia.nosp@m.n@px.nosp@m.4.io

Definition in file output_limit.h.

Macro Definition Documentation

◆ INIT_TIME_US

#define INIT_TIME_US   50000

Definition at line 53 of file output_limit.h.

Referenced by MixerTest::mixerTest(), and output_limit_calc().

◆ RAMP_TIME_US

#define RAMP_TIME_US   500000

Definition at line 57 of file output_limit.h.

Referenced by MixerTest::mixerTest(), and output_limit_calc().

Enumeration Type Documentation

◆ 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.

Function Documentation

◆ output_limit_calc()

__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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ output_limit_init()

__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().

Here is the caller graph for this function: