mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 18:17:34 +08:00
sensors: rc filter: added sample rate of 33.3Hz and lowpass cutoff 5Hz hardcoded for testing
This commit is contained in:
committed by
Lorenz Meier
parent
27a4ce2691
commit
d991285406
@@ -47,14 +47,17 @@
|
||||
#include <uORB/topics/actuator_controls.h>
|
||||
#include <uORB/topics/manual_control_setpoint.h>
|
||||
|
||||
#define RC_SAMPLING_RATE 33.3f
|
||||
#define RC_FILTER_LP_CUTOFF 5.0f
|
||||
|
||||
using namespace sensors;
|
||||
|
||||
RCUpdate::RCUpdate(const Parameters ¶meters)
|
||||
: _parameters(parameters),
|
||||
_filter_roll(0, 0),
|
||||
_filter_pitch(0, 0),
|
||||
_filter_yaw(0, 0),
|
||||
_filter_throttle(0, 0)
|
||||
_filter_roll(RC_SAMPLING_RATE, RC_FILTER_LP_CUTOFF),
|
||||
_filter_pitch(RC_SAMPLING_RATE, RC_FILTER_LP_CUTOFF),
|
||||
_filter_yaw(RC_SAMPLING_RATE, RC_FILTER_LP_CUTOFF),
|
||||
_filter_throttle(RC_SAMPLING_RATE, RC_FILTER_LP_CUTOFF)
|
||||
{
|
||||
memset(&_rc, 0, sizeof(_rc));
|
||||
memset(&_rc_parameter_map, 0, sizeof(_rc_parameter_map));
|
||||
|
||||
Reference in New Issue
Block a user