mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 09:28:58 +00:00
sensors: create vehicle_angular_velocity module (#12596)
* split out filtered sensor_gyro aggregation from mc_att_control and move to wq:rate_ctrl
This commit is contained in:
@@ -92,6 +92,8 @@
|
||||
#include "rc_update.h"
|
||||
#include "voted_sensors_update.h"
|
||||
|
||||
#include "vehicle_angular_velocity/VehicleAngularVelocity.hpp"
|
||||
|
||||
using namespace DriverFramework;
|
||||
using namespace sensors;
|
||||
using namespace time_literals;
|
||||
@@ -135,7 +137,7 @@ class Sensors : public ModuleBase<Sensors>, public ModuleParams
|
||||
{
|
||||
public:
|
||||
Sensors(bool hil_enabled);
|
||||
~Sensors() = default;
|
||||
~Sensors() override;
|
||||
|
||||
/** @see ModuleBase */
|
||||
static int task_spawn(int argc, char *argv[]);
|
||||
@@ -202,6 +204,9 @@ private:
|
||||
VotedSensorsUpdate _voted_sensors_update;
|
||||
|
||||
|
||||
VehicleAngularVelocity _angular_velocity;
|
||||
|
||||
|
||||
/**
|
||||
* Update our local parameter cache.
|
||||
*/
|
||||
@@ -253,6 +258,13 @@ Sensors::Sensors(bool hil_enabled) :
|
||||
}
|
||||
|
||||
#endif /* BOARD_NUMBER_BRICKS > 0 */
|
||||
|
||||
_angular_velocity.Start();
|
||||
}
|
||||
|
||||
Sensors::~Sensors()
|
||||
{
|
||||
_angular_velocity.Stop();
|
||||
}
|
||||
|
||||
int
|
||||
@@ -724,6 +736,8 @@ int Sensors::print_status()
|
||||
PX4_INFO("Airspeed status:");
|
||||
_airspeed_validator.print();
|
||||
|
||||
_angular_velocity.PrintStatus();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user