Firmware
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Airspeed Class Referenceabstract
Inheritance diagram for Airspeed:
ETSAirspeed MEASAirspeed MS5525 SDP3X

Public Member Functions

 Airspeed (int bus, int address, unsigned conversion_interval, const char *path)
 
virtual int init ()
 
virtual int ioctl (device::file_t *filp, int cmd, unsigned long arg)
 

Protected Member Functions

virtual int probe ()
 
virtual void cycle ()=0
 Perform a poll cycle; collect from the previous measurement and start a new one.
 
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.
 
void new_report (const differential_pressure_s &report)
 add a new report to the reports queue More...
 

Static Protected Member Functions

static void cycle_trampoline (void *arg)
 Static trampoline from the workq context; because we don't have a generic workq wrapper yet. More...
 

Protected Attributes

work_s _work
 
bool _sensor_ok
 
int _measure_ticks
 
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
 

Member Function Documentation

§ cycle_trampoline()

void Airspeed::cycle_trampoline ( void *  arg)
staticprotected

Static trampoline from the workq context; because we don't have a generic workq wrapper yet.

Parameters
argInstance pointer for the driver that is polling.

§ new_report()

void Airspeed::new_report ( const differential_pressure_s &  report)
protected

add a new report to the reports queue

Parameters
reportdifferential_pressure_s report

§ start()

void Airspeed::start ( void  )
protected

Initialise the automatic measurement state machine and start it.

Note
This function is called at open and error time. It might make sense to make it more aggressive about resetting the bus in case of errors.

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