mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 06:33:33 +08:00
delete baro_report (alias for sensor_baro_s)
This commit is contained in:
committed by
Lorenz Meier
parent
85c2b6307c
commit
571364c617
@@ -2110,7 +2110,7 @@ MavlinkReceiver::handle_message_hil_sensor(mavlink_message_t *msg)
|
||||
|
||||
/* baro */
|
||||
{
|
||||
struct baro_report baro = {};
|
||||
sensor_baro_s baro = {};
|
||||
|
||||
baro.timestamp = timestamp;
|
||||
baro.pressure = imu.abs_pressure;
|
||||
|
||||
@@ -202,7 +202,7 @@ void VotedSensorsUpdate::parameters_update()
|
||||
|
||||
if (topic_instance < _baro.subscription_count) {
|
||||
// valid subscription, so get the driver id by getting the published sensor data
|
||||
struct baro_report report;
|
||||
sensor_baro_s report;
|
||||
|
||||
if (orb_copy(ORB_ID(sensor_baro), _baro.subscription[topic_instance], &report) == 0) {
|
||||
int temp = _temperature_compensation.set_sensor_id_baro(report.device_id, topic_instance);
|
||||
@@ -813,7 +813,7 @@ void VotedSensorsUpdate::baro_poll(vehicle_air_data_s &airdata)
|
||||
orb_check(_baro.subscription[uorb_index], &baro_updated);
|
||||
|
||||
if (baro_updated) {
|
||||
struct baro_report baro_report;
|
||||
sensor_baro_s baro_report;
|
||||
|
||||
int ret = orb_copy(ORB_ID(sensor_baro), _baro.subscription[uorb_index], &baro_report);
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ protected:
|
||||
ringbuffer::RingBuffer *_reports;
|
||||
|
||||
/* last report */
|
||||
struct baro_report report;
|
||||
sensor_baro_s report;
|
||||
|
||||
orb_advert_t _baro_topic;
|
||||
int _orb_class_instance;
|
||||
@@ -162,7 +162,7 @@ int
|
||||
BAROSIM::init()
|
||||
{
|
||||
int ret;
|
||||
struct baro_report brp = {};
|
||||
sensor_baro_s brp = {};
|
||||
|
||||
ret = VirtDevObj::init();
|
||||
|
||||
@@ -172,7 +172,7 @@ BAROSIM::init()
|
||||
}
|
||||
|
||||
/* allocate basic report buffers */
|
||||
_reports = new ringbuffer::RingBuffer(2, sizeof(baro_report));
|
||||
_reports = new ringbuffer::RingBuffer(2, sizeof(sensor_baro_s));
|
||||
|
||||
if (_reports == nullptr) {
|
||||
PX4_ERR("can't get memory for reports");
|
||||
|
||||
@@ -1061,7 +1061,7 @@ int Simulator::publish_sensor_topics(mavlink_hil_sensor_t *imu)
|
||||
|
||||
/* baro */
|
||||
{
|
||||
struct baro_report baro = {};
|
||||
sensor_baro_s baro = {};
|
||||
|
||||
baro.timestamp = timestamp;
|
||||
baro.pressure = imu->abs_pressure;
|
||||
|
||||
@@ -45,7 +45,7 @@ UavcanBarometerBridge::UavcanBarometerBridge(uavcan::INode &node) :
|
||||
UavcanCDevSensorBridgeBase("uavcan_baro", "/dev/uavcan/baro", BARO_BASE_DEVICE_PATH, ORB_ID(sensor_baro)),
|
||||
_sub_air_pressure_data(node),
|
||||
_sub_air_temperature_data(node),
|
||||
_reports(2, sizeof(baro_report))
|
||||
_reports(2, sizeof(sensor_baro_s))
|
||||
{ }
|
||||
|
||||
int UavcanBarometerBridge::init()
|
||||
@@ -75,8 +75,8 @@ int UavcanBarometerBridge::init()
|
||||
|
||||
ssize_t UavcanBarometerBridge::read(struct file *filp, char *buffer, size_t buflen)
|
||||
{
|
||||
unsigned count = buflen / sizeof(struct baro_report);
|
||||
struct baro_report *baro_buf = reinterpret_cast<struct baro_report *>(buffer);
|
||||
unsigned count = buflen / sizeof(sensor_baro_s);
|
||||
sensor_baro_s *baro_buf = reinterpret_cast<sensor_baro_s *>(buffer);
|
||||
int ret = 0;
|
||||
|
||||
/* buffer must be large enough */
|
||||
@@ -136,7 +136,7 @@ void UavcanBarometerBridge::air_temperature_sub_cb(const
|
||||
void UavcanBarometerBridge::air_pressure_sub_cb(const
|
||||
uavcan::ReceivedDataStructure<uavcan::equipment::air_data::StaticPressure> &msg)
|
||||
{
|
||||
baro_report report;
|
||||
sensor_baro_s report{};
|
||||
|
||||
/*
|
||||
* FIXME HACK
|
||||
|
||||
Reference in New Issue
Block a user