PX4 Firmware
PX4 Autopilot Software http://px4.io
ETSAirspeed Class Reference
Inheritance diagram for ETSAirspeed:
Collaboration diagram for ETSAirspeed:

Public Member Functions

 ETSAirspeed (int bus, int address=I2C_ADDRESS, const char *path=ETS_PATH)
 
- Public Member Functions inherited from Airspeed
 Airspeed (int bus, int address, unsigned conversion_interval, const char *path)
 
virtual ~Airspeed ()
 
virtual int init ()
 
virtual int ioctl (device::file_t *filp, int cmd, unsigned long arg)
 

Protected Member Functions

void Run () override
 Perform a poll cycle; collect from the previous measurement and start a new one. More...
 
int measure () override
 
int collect () override
 
- Protected Member Functions inherited from Airspeed
virtual int probe ()
 
void start ()
 Initialise the automatic measurement state machine and start it. More...
 
void stop ()
 Stop the automatic measurement state machine. More...
 
void new_report (const differential_pressure_s &report)
 add a new report to the reports queue More...
 

Additional Inherited Members

- Protected Attributes inherited from Airspeed
bool _sensor_ok
 
int _measure_interval
 
bool _collect_phase
 
float _diff_pres_offset
 
orb_advert_t _airspeed_pub
 
int _airspeed_orb_class_instance
 
int _class_instance
 
unsigned _conversion_interval
 
perf_counter_t _sample_perf
 
perf_counter_t _comms_errors
 

Detailed Description

Definition at line 62 of file ets_airspeed.cpp.

Constructor & Destructor Documentation

◆ ETSAirspeed()

ETSAirspeed::ETSAirspeed ( int  bus,
int  address = I2C_ADDRESS,
const char *  path = ETS_PATH 
)

Definition at line 84 of file ets_airspeed.cpp.

References DRV_DIFF_PRESS_DEVTYPE_MS4525.

Referenced by ets_airspeed::start_bus().

Here is the caller graph for this function:

Member Function Documentation

◆ collect()

int ETSAirspeed::collect ( )
overrideprotectedvirtual

Implements Airspeed.

Definition at line 109 of file ets_airspeed.cpp.

References Airspeed::_airspeed_pub, Airspeed::_comms_errors, Airspeed::_diff_pres_offset, Airspeed::_sample_perf, differential_pressure_s::device_id, differential_pressure_s::differential_pressure_filtered_pa, differential_pressure_s::differential_pressure_raw_pa, differential_pressure_s::error_count, FLT_EPSILON, hrt_absolute_time(), OK, ORB_ID, orb_publish(), perf_begin(), perf_count(), perf_end(), perf_event_count(), differential_pressure_s::temperature, and differential_pressure_s::timestamp.

Referenced by Run().

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

◆ measure()

int ETSAirspeed::measure ( )
overrideprotectedvirtual

Implements Airspeed.

Definition at line 91 of file ets_airspeed.cpp.

References Airspeed::_comms_errors, OK, perf_count(), and READ_CMD.

Referenced by Run().

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

◆ Run()

void ETSAirspeed::Run ( )
overrideprotectedvirtual

Perform a poll cycle; collect from the previous measurement and start a new one.

Implements Airspeed.

Definition at line 163 of file ets_airspeed.cpp.

References Airspeed::_collect_phase, Airspeed::_comms_errors, Airspeed::_measure_interval, Airspeed::_sensor_ok, collect(), CONVERSION_INTERVAL, DEVICE_DEBUG, measure(), OK, perf_count(), and Airspeed::start().

Here is the call graph for this function:

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