PX4 Firmware
PX4 Autopilot Software http://px4.io
output_limit.cpp File Reference
#include "output_limit.h"
#include <px4_platform_common/defines.h>
#include <math.h>
#include <stdbool.h>
#include <drivers/drv_hrt.h>
#include <stdio.h>
Include dependency graph for output_limit.cpp:

Go to the source code of this file.

Macros

#define PROGRESS_INT_SCALING   10000
 

Functions

void output_limit_init (output_limit_t *limit)
 
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)
 

Macro Definition Documentation

◆ PROGRESS_INT_SCALING

#define PROGRESS_INT_SCALING   10000

Definition at line 42 of file output_limit.cpp.

Referenced by output_limit_calc().

Function Documentation

◆ output_limit_calc()

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

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: