80 if (g_dev !=
nullptr) {
81 PX4_ERR(
"already started");
88 if (g_dev ==
nullptr) {
93 if (g_dev->
init() != PX4_OK) {
112 if (g_dev !=
nullptr) {
123 if (g_dev !=
nullptr) {
128 PX4_ERR(
"driver not running");
146 PX4_ERR(
"driver reset failed");
151 PX4_ERR(
"driver poll restart failed");
164 PX4_INFO(
"usage: ms5525_airspeed command [options]");
165 PX4_INFO(
"options:");
167 PX4_INFO(
"\t-a --all");
168 PX4_INFO(
"command:");
169 PX4_INFO(
"\tstart|stop|reset");
179 const char *myoptarg =
nullptr;
180 bool start_all =
false;
182 while ((ch = px4_getopt(argc, argv,
"ab:", &myoptind, &myoptarg)) != EOF) {
185 i2c_bus = atoi(myoptarg);
198 if (myoptind >= argc) {
206 if (!strcmp(argv[myoptind],
"start")) {
218 if (!strcmp(argv[myoptind],
"stop")) {
225 if (!strcmp(argv[myoptind],
"reset")) {
#define SENSOR_POLLRATE_DEFAULT
poll at driver normal rate
static void ms5525_airspeed_usage()
#define SENSORIOCSPOLLRATE
Set the driver polling rate to (arg) Hz, or one of the SENSOR_POLLRATE constants. ...
static constexpr uint8_t PX4_I2C_BUS_DEFAULT
int reset()
Reset the driver.
int stop()
Stop the driver.
static const int i2c_bus_options[]
static constexpr uint8_t I2C_ADDRESS_1_MS5525DSO
int start_bus(uint8_t i2c_bus)
Start the driver on a specific bus.
#define SENSORIOCRESET
Reset the sensor to its default configuration.
__EXPORT int ms5525_airspeed_main(int argc, char *argv[])
#define NUM_I2C_BUS_OPTIONS
static constexpr const char PATH_MS5525[]
int start()
Attempt to start driver on all available I2C busses.