mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-28 12:04:07 +08:00
sensors/vehicle_air_data: move to sensors namespace
- move params to end of class
This commit is contained in:
parent
405cb5038d
commit
6d52772d30
@ -36,6 +36,9 @@
|
||||
#include <px4_platform_common/log.h>
|
||||
#include <lib/ecl/geo/geo.h>
|
||||
|
||||
namespace sensors
|
||||
{
|
||||
|
||||
using namespace matrix;
|
||||
using namespace time_literals;
|
||||
|
||||
@ -51,14 +54,12 @@ VehicleAirData::VehicleAirData() :
|
||||
VehicleAirData::~VehicleAirData()
|
||||
{
|
||||
Stop();
|
||||
|
||||
perf_free(_cycle_perf);
|
||||
}
|
||||
|
||||
bool VehicleAirData::Start()
|
||||
{
|
||||
ScheduleNow();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -285,3 +286,5 @@ void VehicleAirData::PrintStatus()
|
||||
|
||||
_voter.print();
|
||||
}
|
||||
|
||||
}; // namespace sensors
|
||||
|
||||
@ -51,6 +51,8 @@
|
||||
#include <uORB/topics/sensor_correction.h>
|
||||
#include <uORB/topics/vehicle_air_data.h>
|
||||
|
||||
namespace sensors
|
||||
{
|
||||
class VehicleAirData : public ModuleParams, public px4::ScheduledWorkItem
|
||||
{
|
||||
public:
|
||||
@ -71,10 +73,6 @@ private:
|
||||
|
||||
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::Subscription _params_sub{ORB_ID(parameter_update)};
|
||||
@ -102,4 +100,9 @@ private:
|
||||
uint8_t _priority[MAX_SENSOR_COUNT] {};
|
||||
|
||||
int8_t _selected_sensor_sub_index{-1};
|
||||
|
||||
DEFINE_PARAMETERS(
|
||||
(ParamFloat<px4::params::SENS_BARO_QNH>) _param_sens_baro_qnh
|
||||
)
|
||||
};
|
||||
}; // namespace sensors
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user