diff --git a/src/drivers/airspeed/airspeed.cpp b/src/drivers/airspeed/airspeed.cpp index 640801849f..404511f97a 100644 --- a/src/drivers/airspeed/airspeed.cpp +++ b/src/drivers/airspeed/airspeed.cpp @@ -367,7 +367,7 @@ Airspeed::update_status() SUBSYSTEM_TYPE_DIFFPRESSURE }; - if (_subsys_pub == nullptr) { + if (_subsys_pub != nullptr) { orb_publish(ORB_ID(subsystem_info), _subsys_pub, &info); } else { _subsys_pub = orb_advertise(ORB_ID(subsystem_info), &info); diff --git a/src/drivers/device/vdev.cpp b/src/drivers/device/vdev.cpp index 3e3c02a939..8ff8ae1fc8 100644 --- a/src/drivers/device/vdev.cpp +++ b/src/drivers/device/vdev.cpp @@ -64,7 +64,7 @@ private: px4_dev_t() {} }; -#define PX4_MAX_DEV 100 +#define PX4_MAX_DEV 50 static px4_dev_t *devmap[PX4_MAX_DEV]; /*