Skip to content

Commit 1f3234c

Browse files
authored
Fix build failures in update methods (#233)
This fixes build errors like the following: In file included from /build/imu_tools-release-release-rolling-rviz_imu_plugin-2.2.3-1/src/imu_display.cpp:31: /build/imu_tools-release-release-rolling-rviz_imu_plugin-2.2.3-1/src/imu_display.h:72:10: error: 'void rviz_imu_plugin::ImuDisplay::update(float, float)' marked 'override', but does not override 72 | void update(float dt, float ros_dt) override; | ^~~~~~ The update(float, float) method was replaced with update(std::chrono::duration, std::chrono::duration) in ros2/rviz#1533.
1 parent 921dd41 commit 1f3234c

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

rviz_imu_plugin/src/imu_display.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void ImuDisplay::reset()
113113
acc_visual_->hide();
114114
}
115115

116-
void ImuDisplay::update(float /* dt */, float /* ros_dt */)
116+
void ImuDisplay::update(std::chrono::nanoseconds /* wall_dt */, std::chrono::nanoseconds /* ros_dt */)
117117
{
118118
updateTop();
119119
updateBox();

rviz_imu_plugin/src/imu_display.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class ImuDisplay
6969

7070
void reset() override;
7171

72-
void update(float dt, float ros_dt) override;
72+
void update(std::chrono::nanoseconds wall_dt, std::chrono::nanoseconds ros_dt) override;
7373

7474
private:
7575
void createProperties();

rviz_imu_plugin/src/mag_display.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void MagDisplay::reset()
8585
mag_visual_->hide();
8686
}
8787

88-
void MagDisplay::update(float /* dt */, float /* ros_dt */)
88+
void MagDisplay::update(std::chrono::nanoseconds /* wall_dt */, std::chrono::nanoseconds /* ros_dt */)
8989
{
9090
updateMag();
9191
}

rviz_imu_plugin/src/mag_display.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class MagDisplay
6767

6868
void reset() override;
6969

70-
void update(float dt, float ros_dt) override;
70+
void update(std::chrono::nanoseconds wall_dt, std::chrono::nanoseconds ros_dt) override;
7171

7272
private:
7373
void createProperties();

0 commit comments

Comments
 (0)