11 #if FRAME_CONFIG == HELI_FRAME 33 channel_throttle->set_range(1000);
45 ap.throttle_zero =
true;
48 ap.rc_override_enable =
true;
63 #if FRAME_CONFIG != HELI_FRAME 74 #if FRAME_CONFIG != HELI_FRAME 78 uint16_t safety_ignore_mask = (~
copter.motors->get_motor_mask()) & 0x3FFF;
96 uint32_t tnow_ms =
millis();
99 ap.new_radio_frame =
true;
106 ap.rc_receiver_present =
true;
126 #define FS_COUNTER 3 // radio failsafe kicks in after 3 consecutive throttle values below failsafe_throttle_value 168 #define THROTTLE_ZERO_DEBOUNCE_TIME_MS 400 175 static uint32_t last_nonzero_throttle_ms = 0;
176 uint32_t tnow_ms =
millis();
181 if ((!
ap.using_interlock && (throttle_control > 0) && !
ap.motor_emergency_stop) ||
182 (
ap.using_interlock &&
motors->get_interlock()) ||
183 ap.armed_with_switch) {
184 last_nonzero_throttle_ms = tnow_ms;
185 ap.throttle_zero =
false;
187 ap.throttle_zero =
true;
205 #if TOY_MODE_ENABLED == ENABLED AP_BoardConfig BoardConfig
void set_range(uint16_t high)
LowPassFilterFloat rc_throttle_control_in_filter
int16_t get_control_mid() const
virtual void set_esc_scaling(uint16_t min_pwm, uint16_t max_pwm)
int16_t get_radio_in() const
uint16_t get_loop_rate_hz(void)
static RC_Channel * rc_channel(uint8_t chan)
void radio_passthrough_to_motors()
void set_pwm(int16_t pwm)
RC_Channel * channel_roll
uint32_t last_radio_update_ms
void set_angle(uint16_t angle)
void set_default_safety_ignore_mask(uint16_t mask)
AP_Int16 failsafe_throttle_value
void set_throttle_zero_flag(int16_t throttle_control)
#define ERROR_CODE_RADIO_LATE_FRAME
static void update_aux_servo_function(void)
#define FS_RADIO_RC_OVERRIDE_TIMEOUT_MS
int16_t get_throttle_mid(void)
int16_t get_throttle_mid(void)
void Log_Write_Error(uint8_t sub_system, uint8_t error_code)
RC_Channel * channel_throttle
int16_t get_control_in() const
RC_Channel * channel_pitch
#define FS_RADIO_TIMEOUT_MS
void set_failsafe_radio(bool b)
static void enable_aux_servos(void)
void set_throttle_and_failsafe(uint16_t throttle_pwm)
#define ERROR_SUBSYSTEM_RADIO
int16_t get_control_in_zero_dz(void)
static bool read_input(void)
#define ROLL_PITCH_YAW_INPUT_MAX
AP_HAL_MAIN_CALLBACKS & copter
int16_t get_radio_min() const
int16_t get_radio_max() const
struct Copter::@2 failsafe
void esc_calibration_startup_check()
AP_Int8 failsafe_throttle
void set_default_dead_zone(int16_t dzone)
void enable_motor_output()
#define THROTTLE_ZERO_DEBOUNCE_TIME_MS
void default_dead_zones()
float apply(float sample, float dt)