@@ -37,8 +37,6 @@ namespace autoware_overlay_rviz_plugin
37
37
38
38
TurnSignalsDisplay::TurnSignalsDisplay () : current_turn_signal_(0 )
39
39
{
40
- last_toggle_time_ = std::chrono::steady_clock::now ();
41
-
42
40
// Load the arrow image
43
41
std::string package_path =
44
42
ament_index_cpp::get_package_share_directory (" autoware_overlay_rviz_plugin" );
@@ -87,28 +85,16 @@ void TurnSignalsDisplay::drawArrows(
87
85
(current_turn_signal_ == autoware_vehicle_msgs::msg::TurnIndicatorsReport::ENABLE_RIGHT ||
88
86
current_hazard_lights_ == autoware_vehicle_msgs::msg::HazardLightsReport::ENABLE);
89
87
90
- // Color the arrows based on the state of the turn signals and hazard lights by having them blink
91
- // on and off
92
- if (this ->blink_on_ ) {
93
- if (leftActive) {
94
- scaledLeftArrow = coloredImage (scaledLeftArrow, color);
95
- }
96
- if (rightActive) {
97
- scaledRightArrow = coloredImage (scaledRightArrow, color);
98
- }
88
+ if (leftActive) {
89
+ scaledLeftArrow = coloredImage (scaledLeftArrow, color);
90
+ }
91
+ if (rightActive) {
92
+ scaledRightArrow = coloredImage (scaledRightArrow, color);
99
93
}
100
94
101
95
// Draw the arrows
102
96
painter.drawImage (QPointF (leftArrowXPos, arrowYPos), scaledLeftArrow);
103
97
painter.drawImage (QPointF (rightArrowXPos, arrowYPos), scaledRightArrow);
104
-
105
- auto now = std::chrono::steady_clock::now ();
106
- if (
107
- std::chrono::duration_cast<std::chrono::milliseconds>(now - last_toggle_time_) >=
108
- blink_interval_) {
109
- blink_on_ = !blink_on_; // Toggle the blink state
110
- last_toggle_time_ = now;
111
- }
112
98
}
113
99
114
100
QImage TurnSignalsDisplay::coloredImage (const QImage & source, const QColor & color)
0 commit comments