APM:Libraries
Classes | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Linux::RCOutput_Disco Class Reference

#include <RCOutput_Disco.h>

Inheritance diagram for Linux::RCOutput_Disco:
[legend]
Collaboration diagram for Linux::RCOutput_Disco:
[legend]

Classes

struct  output_table_t
 

Public Member Functions

 RCOutput_Disco (AP_HAL::OwnPtr< AP_HAL::I2CDevice > dev)
 
 ~RCOutput_Disco ()
 
void init () override
 
void set_freq (uint32_t chmask, uint16_t freq_hz) override
 
uint16_t get_freq (uint8_t ch) override
 
void enable_ch (uint8_t ch) override
 
void disable_ch (uint8_t ch) override
 
void write (uint8_t ch, uint16_t period_us) override
 
uint16_t read (uint8_t ch) override
 
void read (uint16_t *period_us, uint8_t len) override
 
void cork () override
 
void push () override
 
void set_esc_scaling (uint16_t min_pwm, uint16_t max_pwm) override
 
- Public Member Functions inherited from AP_HAL::RCOutput
virtual uint16_t read_last_sent (uint8_t ch)
 
virtual void read_last_sent (uint16_t *period_us, uint8_t len)
 
virtual void set_safety_pwm (uint32_t chmask, uint16_t period_us)
 
virtual void set_failsafe_pwm (uint32_t chmask, uint16_t period_us)
 
virtual bool force_safety_on (void)
 
virtual void force_safety_off (void)
 
virtual void force_safety_no_wait (void)
 
virtual bool get_esc_scaling (uint16_t &min_pwm, uint16_t &max_pwm)
 
virtual float scale_esc_to_unity (uint16_t pwm)
 
virtual bool enable_px4io_sbus_out (uint16_t rate_hz)
 
virtual void timer_tick (void)
 
virtual bool serial_setup_output (uint8_t chan, uint32_t baudrate)
 
virtual bool serial_write_bytes (const uint8_t *bytes, uint16_t len)
 
virtual uint16_t serial_read_bytes (uint8_t *buf, uint16_t len)
 
virtual void serial_end (void)
 
virtual void set_output_mode (uint16_t mask, enum output_mode mode)
 
virtual void set_default_rate (uint16_t rate_hz)
 
virtual void set_telem_request_mask (uint16_t mask)
 

Static Public Member Functions

static RCOutput_Bebopfrom (AP_HAL::RCOutput *rcoutput)
 

Private Attributes

RCOutput_Bebop bebop_out
 
RCOutput_Sysfs sysfs_out {0, 1, 6}
 
const output_table_t output_table [7]
 

Additional Inherited Members

- Public Types inherited from AP_HAL::RCOutput
enum  output_mode {
  MODE_PWM_NONE, MODE_PWM_NORMAL, MODE_PWM_ONESHOT, MODE_PWM_ONESHOT125,
  MODE_PWM_BRUSHED, MODE_PWM_DSHOT150, MODE_PWM_DSHOT300, MODE_PWM_DSHOT600,
  MODE_PWM_DSHOT1200
}
 

Detailed Description

Definition at line 9 of file RCOutput_Disco.h.

Constructor & Destructor Documentation

◆ RCOutput_Disco()

Linux::RCOutput_Disco::RCOutput_Disco ( AP_HAL::OwnPtr< AP_HAL::I2CDevice dev)

Definition at line 31 of file RCOutput_Disco.cpp.

◆ ~RCOutput_Disco()

Linux::RCOutput_Disco::~RCOutput_Disco ( )
inline

Definition at line 12 of file RCOutput_Disco.h.

Member Function Documentation

◆ cork()

void Linux::RCOutput_Disco::cork ( void  )
overridevirtual

Implements AP_HAL::RCOutput.

Definition at line 99 of file RCOutput_Disco.cpp.

Referenced by from().

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

◆ disable_ch()

void Linux::RCOutput_Disco::disable_ch ( uint8_t  ch)
overridevirtual

Implements AP_HAL::RCOutput.

Definition at line 68 of file RCOutput_Disco.cpp.

Referenced by from().

Here is the caller graph for this function:

◆ enable_ch()

void Linux::RCOutput_Disco::enable_ch ( uint8_t  ch)
overridevirtual

Implements AP_HAL::RCOutput.

Definition at line 60 of file RCOutput_Disco.cpp.

Referenced by from().

Here is the caller graph for this function:

◆ from()

static RCOutput_Bebop* Linux::RCOutput_Disco::from ( AP_HAL::RCOutput rcoutput)
inlinestatic

Definition at line 14 of file RCOutput_Disco.h.

Referenced by Linux::ToneAlarm_Disco::init(), and AP_BattMonitor_Bebop::read().

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

◆ get_freq()

uint16_t Linux::RCOutput_Disco::get_freq ( uint8_t  ch)
overridevirtual

Implements AP_HAL::RCOutput.

Definition at line 52 of file RCOutput_Disco.cpp.

Referenced by from().

Here is the caller graph for this function:

◆ init()

void Linux::RCOutput_Disco::init ( void  )
overridevirtual

Implements AP_HAL::RCOutput.

Definition at line 36 of file RCOutput_Disco.cpp.

Referenced by from().

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

◆ push()

void Linux::RCOutput_Disco::push ( void  )
overridevirtual

Implements AP_HAL::RCOutput.

Definition at line 105 of file RCOutput_Disco.cpp.

Referenced by from().

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

◆ read() [1/2]

uint16_t Linux::RCOutput_Disco::read ( uint8_t  ch)
overridevirtual

Implements AP_HAL::RCOutput.

Definition at line 84 of file RCOutput_Disco.cpp.

Referenced by from(), and read().

Here is the caller graph for this function:

◆ read() [2/2]

void Linux::RCOutput_Disco::read ( uint16_t *  period_us,
uint8_t  len 
)
overridevirtual

Implements AP_HAL::RCOutput.

Definition at line 92 of file RCOutput_Disco.cpp.

Here is the call graph for this function:

◆ set_esc_scaling()

void Linux::RCOutput_Disco::set_esc_scaling ( uint16_t  min_pwm,
uint16_t  max_pwm 
)
overridevirtual

Reimplemented from AP_HAL::RCOutput.

Definition at line 111 of file RCOutput_Disco.cpp.

Referenced by from().

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

◆ set_freq()

void Linux::RCOutput_Disco::set_freq ( uint32_t  chmask,
uint16_t  freq_hz 
)
overridevirtual

Implements AP_HAL::RCOutput.

Definition at line 43 of file RCOutput_Disco.cpp.

Referenced by from().

Here is the caller graph for this function:

◆ write()

void Linux::RCOutput_Disco::write ( uint8_t  ch,
uint16_t  period_us 
)
overridevirtual

Implements AP_HAL::RCOutput.

Definition at line 76 of file RCOutput_Disco.cpp.

Referenced by from().

Here is the caller graph for this function:

Member Data Documentation

◆ bebop_out

RCOutput_Bebop Linux::RCOutput_Disco::bebop_out
private

Definition at line 36 of file RCOutput_Disco.h.

Referenced by cork(), from(), init(), push(), and set_esc_scaling().

◆ output_table

const output_table_t Linux::RCOutput_Disco::output_table[7]
private
Initial value:
= {
{ sysfs_out, 3 },
{ sysfs_out, 2 },
{ bebop_out, 0 },
{ sysfs_out, 4 },
{ sysfs_out, 1 },
{ sysfs_out, 5 },
{ sysfs_out, 0 },
}

Definition at line 47 of file RCOutput_Disco.h.

Referenced by disable_ch(), enable_ch(), get_freq(), read(), set_freq(), and write().

◆ sysfs_out

RCOutput_Sysfs Linux::RCOutput_Disco::sysfs_out {0, 1, 6}
private

Definition at line 37 of file RCOutput_Disco.h.

Referenced by cork(), init(), push(), and set_esc_scaling().


The documentation for this class was generated from the following files: