sensors/vehicle_air_data: move to sensors namespace

- move params to end of class
This commit is contained in:
Daniel Agar
2020-07-07 10:33:53 -04:00
parent 405cb5038d
commit 6d52772d30
2 changed files with 12 additions and 6 deletions

View File

@@ -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

View File

@@ -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