44 #include <sys/types.h> 48 #include <semaphore.h> 57 #include <px4_workqueue.h> 58 #include <arch/board/board.h> 67 #include <lib/cdev/CDev.hpp> 70 #include <uORB/topics/differential_pressure.h> 73 #define PX4_I2C_BUS_DEFAULT PX4_I2C_BUS_EXPANSION 75 #ifndef CONFIG_SCHED_WORKQUEUE 76 # error This requires CONFIG_SCHED_WORKQUEUE. 82 AirspeedSim(
int bus,
int address,
unsigned conversion_interval,
const char *path);
93 virtual void print_info();
96 ringbuffer::RingBuffer *_reports;
111 virtual void cycle() = 0;
112 virtual int measure() = 0;
113 virtual int collect() = 0;
115 virtual int transfer(
const uint8_t *send,
unsigned send_len,
116 uint8_t *recv,
unsigned recv_len);
122 float _diff_pres_offset;
128 int _conversion_interval;
141 int probe_address(uint8_t address);
162 static void cycle_trampoline(
void *arg);
169 void new_report(
const differential_pressure_s &report);
A flexible ringbuffer class.
Definition: airspeedsim.h:79
virtual ssize_t read(file_t *filep, char *buffer, size_t buflen)
Perform a read from the device.
Definition: CDev.hpp:105
Configuration flags used in code.
__BEGIN_DECLS typedef void * orb_advert_t
ORB topic advertiser handle.
Definition: uORB.h:134
High-resolution timer with callouts and timekeeping.
Generally used magic defines.
Global flash based parameter store.
API for the uORB lightweight object broker.
Simple error/warning functions, heavily inspired by the BSD functions of the same names...
Definition: cdev_platform.hpp:20
Abstract class for any character device.
Definition: CDev.hpp:58
Definition: video_device.h:50
Definition: airspeedsim.h:118
virtual int ioctl(file_t *filep, int cmd, unsigned long arg)
Perform an ioctl operation on the device.
Definition: CDev.cpp:192
Airspeed driver interface.
Performance measuring tools.