mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
sensors/vehicle_air_data: move to sensors namespace
- move params to end of class
This commit is contained in:
@@ -36,6 +36,9 @@
|
|||||||
#include <px4_platform_common/log.h>
|
#include <px4_platform_common/log.h>
|
||||||
#include <lib/ecl/geo/geo.h>
|
#include <lib/ecl/geo/geo.h>
|
||||||
|
|
||||||
|
namespace sensors
|
||||||
|
{
|
||||||
|
|
||||||
using namespace matrix;
|
using namespace matrix;
|
||||||
using namespace time_literals;
|
using namespace time_literals;
|
||||||
|
|
||||||
@@ -51,14 +54,12 @@ VehicleAirData::VehicleAirData() :
|
|||||||
VehicleAirData::~VehicleAirData()
|
VehicleAirData::~VehicleAirData()
|
||||||
{
|
{
|
||||||
Stop();
|
Stop();
|
||||||
|
|
||||||
perf_free(_cycle_perf);
|
perf_free(_cycle_perf);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VehicleAirData::Start()
|
bool VehicleAirData::Start()
|
||||||
{
|
{
|
||||||
ScheduleNow();
|
ScheduleNow();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,3 +286,5 @@ void VehicleAirData::PrintStatus()
|
|||||||
|
|
||||||
_voter.print();
|
_voter.print();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}; // namespace sensors
|
||||||
|
|||||||
@@ -51,6 +51,8 @@
|
|||||||
#include <uORB/topics/sensor_correction.h>
|
#include <uORB/topics/sensor_correction.h>
|
||||||
#include <uORB/topics/vehicle_air_data.h>
|
#include <uORB/topics/vehicle_air_data.h>
|
||||||
|
|
||||||
|
namespace sensors
|
||||||
|
{
|
||||||
class VehicleAirData : public ModuleParams, public px4::ScheduledWorkItem
|
class VehicleAirData : public ModuleParams, public px4::ScheduledWorkItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -71,10 +73,6 @@ private:
|
|||||||
|
|
||||||
static constexpr int MAX_SENSOR_COUNT = 3;
|
static constexpr int MAX_SENSOR_COUNT = 3;
|
||||||
|
|
||||||
DEFINE_PARAMETERS(
|
|
||||||
(ParamFloat<px4::params::SENS_BARO_QNH>) _param_sens_baro_qnh
|
|
||||||
)
|
|
||||||
|
|
||||||
uORB::Publication<vehicle_air_data_s> _vehicle_air_data_pub{ORB_ID(vehicle_air_data)};
|
uORB::Publication<vehicle_air_data_s> _vehicle_air_data_pub{ORB_ID(vehicle_air_data)};
|
||||||
|
|
||||||
uORB::Subscription _params_sub{ORB_ID(parameter_update)};
|
uORB::Subscription _params_sub{ORB_ID(parameter_update)};
|
||||||
@@ -102,4 +100,9 @@ private:
|
|||||||
uint8_t _priority[MAX_SENSOR_COUNT] {};
|
uint8_t _priority[MAX_SENSOR_COUNT] {};
|
||||||
|
|
||||||
int8_t _selected_sensor_sub_index{-1};
|
int8_t _selected_sensor_sub_index{-1};
|
||||||
|
|
||||||
|
DEFINE_PARAMETERS(
|
||||||
|
(ParamFloat<px4::params::SENS_BARO_QNH>) _param_sens_baro_qnh
|
||||||
|
)
|
||||||
};
|
};
|
||||||
|
}; // namespace sensors
|
||||||
|
|||||||
Reference in New Issue
Block a user