PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <airspeed.h>
Public Member Functions | |
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 | |
virtual int | probe () |
virtual void | Run ()=0 |
Perform a poll cycle; collect from the previous measurement and start a new one. More... | |
virtual int | measure ()=0 |
virtual int | collect ()=0 |
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... | |
Protected Attributes | |
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 |
Private Member Functions | |
Airspeed (const Airspeed &) | |
Airspeed & | operator= (const Airspeed &) |
Definition at line 50 of file airspeed.h.
Airspeed::Airspeed | ( | int | bus, |
int | address, | ||
unsigned | conversion_interval, | ||
const char * | path | ||
) |
Definition at line 59 of file airspeed.cpp.
|
virtual |
Definition at line 75 of file airspeed.cpp.
References _airspeed_pub, _class_instance, _comms_errors, _sample_perf, AIRSPEED_BASE_DEVICE_PATH, orb_unadvertise(), perf_free(), and stop().
|
private |
|
protectedpure virtual |
Implemented in MEASAirspeed, SDP3X, ETSAirspeed, and MS5525.
|
virtual |
Definition at line 92 of file airspeed.cpp.
References _airspeed_orb_class_instance, _airspeed_pub, _class_instance, AIRSPEED_BASE_DEVICE_PATH, ToneAlarmInterface::init(), measure(), orb_advertise_multi(), ORB_ID, and ORB_PRIO_HIGH.
Referenced by PX4IO::set_update_rate(), ms5525_airspeed::start_bus(), sdp3x_airspeed::start_bus(), ets_airspeed::start_bus(), meas_airspeed::start_bus(), and tone_alarm_main().
|
virtual |
Definition at line 133 of file airspeed.cpp.
References _conversion_interval, _diff_pres_offset, _measure_interval, AIRSPEEDIOCSSCALE, airspeed_scale::offset_pa, OK, SENSOR_POLLRATE_DEFAULT, SENSORIOCSPOLLRATE, and start().
Referenced by px4io_main(), and PX4IO::set_update_rate().
|
protectedpure virtual |
Implemented in MEASAirspeed, SDP3X, ETSAirspeed, and MS5525.
Referenced by init(), and probe().
|
protected |
add a new report to the reports queue
report | differential_pressure_s report |
|
protectedvirtual |
Reimplemented in SDP3X.
Definition at line 118 of file airspeed.cpp.
References measure().
|
protectedpure virtual |
Perform a poll cycle; collect from the previous measurement and start a new one.
Implemented in MEASAirspeed, SDP3X, ETSAirspeed, and MS5525.
|
protected |
Initialise the automatic measurement state machine and start it.
Definition at line 200 of file airspeed.cpp.
References _collect_phase.
Referenced by ioctl(), MS5525::Run(), ETSAirspeed::Run(), and MEASAirspeed::Run().
|
protected |
Stop the automatic measurement state machine.
Definition at line 210 of file airspeed.cpp.
Referenced by ~Airspeed().
|
protected |
Definition at line 82 of file airspeed.h.
Referenced by init().
|
protected |
Definition at line 81 of file airspeed.h.
Referenced by MS5525::collect(), ETSAirspeed::collect(), SDP3X::collect(), MEASAirspeed::collect(), init(), and ~Airspeed().
|
protected |
Definition at line 84 of file airspeed.h.
Referenced by init(), and ~Airspeed().
|
protected |
Definition at line 78 of file airspeed.h.
Referenced by MS5525::Run(), ETSAirspeed::Run(), MEASAirspeed::Run(), and start().
|
protected |
Definition at line 89 of file airspeed.h.
Referenced by MS5525::collect(), ETSAirspeed::collect(), SDP3X::collect(), MEASAirspeed::collect(), MS5525::init_ms5525(), SDP3X::init_sdp3x(), MS5525::measure(), ETSAirspeed::measure(), MEASAirspeed::measure(), ETSAirspeed::Run(), and ~Airspeed().
|
protected |
Definition at line 86 of file airspeed.h.
Referenced by ioctl().
|
protected |
Definition at line 79 of file airspeed.h.
Referenced by MS5525::collect(), ETSAirspeed::collect(), SDP3X::collect(), MEASAirspeed::collect(), and ioctl().
|
protected |
Definition at line 77 of file airspeed.h.
Referenced by ioctl(), MS5525::Run(), ETSAirspeed::Run(), and MEASAirspeed::Run().
|
protected |
Definition at line 88 of file airspeed.h.
Referenced by MS5525::collect(), ETSAirspeed::collect(), SDP3X::collect(), MEASAirspeed::collect(), and ~Airspeed().
|
protected |
Definition at line 76 of file airspeed.h.
Referenced by MS5525::Run(), ETSAirspeed::Run(), SDP3X::Run(), and MEASAirspeed::Run().