APM:Libraries
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
SITL::Sprayer Class Reference

#include <SIM_Sprayer.h>

Public Member Functions

 Sprayer (const uint8_t _pump_servo, int8_t _spinner_servo)
 
void update (const struct Aircraft::sitl_input &input)
 
float payload_mass () const
 

Public Attributes

const uint8_t pump_servo
 
const int8_t spinner_servo
 

Private Member Functions

bool should_report ()
 

Private Attributes

const uint32_t report_interval = 1000000
 
uint64_t last_report_us
 
const float pump_max_rate = 0.01
 
const float pump_slew_rate = 20
 
float last_pump_output
 
const float spinner_max_rate = 3600
 
const float spinner_slew_rate = 20
 
float last_spinner_output
 
double capacity = 0.25
 
uint64_t last_update_us
 
bool zero_report_done = false
 

Detailed Description

Definition at line 25 of file SIM_Sprayer.h.

Constructor & Destructor Documentation

◆ Sprayer()

SITL::Sprayer::Sprayer ( const uint8_t  _pump_servo,
int8_t  _spinner_servo 
)
inline

Definition at line 30 of file SIM_Sprayer.h.

Here is the call graph for this function:

Member Function Documentation

◆ payload_mass()

float SITL::Sprayer::payload_mass ( ) const
inline

Definition at line 38 of file SIM_Sprayer.h.

Referenced by SITL::MultiCopter::gross_mass().

Here is the caller graph for this function:

◆ should_report()

bool Sprayer::should_report ( )
private

Definition at line 72 of file SIM_Sprayer.cpp.

Referenced by update().

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

◆ update()

void Sprayer::update ( const struct Aircraft::sitl_input input)

Definition at line 27 of file SIM_Sprayer.cpp.

Referenced by Sprayer(), and SITL::MultiCopter::update().

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

Member Data Documentation

◆ capacity

double SITL::Sprayer::capacity = 0.25
private

Definition at line 53 of file SIM_Sprayer.h.

Referenced by payload_mass(), and update().

◆ last_pump_output

float SITL::Sprayer::last_pump_output
private

Definition at line 47 of file SIM_Sprayer.h.

Referenced by should_report(), and update().

◆ last_report_us

uint64_t SITL::Sprayer::last_report_us
private

Definition at line 43 of file SIM_Sprayer.h.

Referenced by should_report(), and update().

◆ last_spinner_output

float SITL::Sprayer::last_spinner_output
private

Definition at line 51 of file SIM_Sprayer.h.

Referenced by should_report(), and update().

◆ last_update_us

uint64_t SITL::Sprayer::last_update_us
private

Definition at line 55 of file SIM_Sprayer.h.

Referenced by update().

◆ pump_max_rate

const float SITL::Sprayer::pump_max_rate = 0.01
private

Definition at line 45 of file SIM_Sprayer.h.

Referenced by update().

◆ pump_servo

const uint8_t SITL::Sprayer::pump_servo

Definition at line 27 of file SIM_Sprayer.h.

Referenced by update().

◆ pump_slew_rate

const float SITL::Sprayer::pump_slew_rate = 20
private

Definition at line 46 of file SIM_Sprayer.h.

Referenced by update().

◆ report_interval

const uint32_t SITL::Sprayer::report_interval = 1000000
private

Definition at line 42 of file SIM_Sprayer.h.

Referenced by should_report().

◆ spinner_max_rate

const float SITL::Sprayer::spinner_max_rate = 3600
private

Definition at line 49 of file SIM_Sprayer.h.

Referenced by update().

◆ spinner_servo

const int8_t SITL::Sprayer::spinner_servo

Definition at line 28 of file SIM_Sprayer.h.

Referenced by update().

◆ spinner_slew_rate

const float SITL::Sprayer::spinner_slew_rate = 20
private

Definition at line 50 of file SIM_Sprayer.h.

Referenced by update().

◆ zero_report_done

bool SITL::Sprayer::zero_report_done = false
private

Definition at line 58 of file SIM_Sprayer.h.

Referenced by should_report().


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