Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ekf2: fix a shadow warning #22489

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/modules/ekf2/EKF/aux_global_position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void AuxGlobalPosition::update(Ekf &ekf, const estimator::imuSample &imu_delayed

if (_aux_global_position_buffer.pop_first_older_than(imu_delayed.time_us, &sample)) {

if (!(_param_ekf2_agp_ctrl.get() & static_cast<int32_t>(Ctrl::HPOS))) {
if (!(_param_ekf2_agp_ctrl.get() & static_cast<int32_t>(AuxGlobalPositionCtrl::HPOS))) {
return;
}

Expand Down
5 changes: 0 additions & 5 deletions src/modules/ekf2/EKF/aux_global_position.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ class AuxGlobalPosition : public ModuleParams
RingBuffer<AuxGlobalPositionSample> _aux_global_position_buffer{20}; // TODO: size with _obs_buffer_length and actual publication rate
uint64_t _time_last_buffer_push{0};

enum class Ctrl : uint8_t {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need this part. AuxGlobalPositionCtrl

HPOS = (1<<0),
VPOS = (1<<1)
};

enum class State {
stopped,
starting,
Expand Down
Loading