Skip to content

Commit 3d7dabe

Browse files
author
KhalilSelyan
committed
chore: align steering angle text in both negative and positive cases
Signed-off-by: KhalilSelyan <khalil@leodrive.ai>
1 parent 0eb1376 commit 3d7dabe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: common/autoware_overlay_rviz_plugin/autoware_overlay_rviz_plugin/src/steering_wheel_display.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ void SteeringWheelDisplay::drawSteeringWheel(
106106
}
107107

108108
QString steeringAngleString = QString::fromStdString(steering_angle_ss.str());
109+
// if the string doesn't have a negative sign, add a space to the front of the string
110+
// to align the text in both cases (negative and positive)
111+
if (steeringAngleString[0] != '-') {
112+
steeringAngleString = " " + steeringAngleString;
113+
}
109114

110115
// Draw the steering angle text
111116
QFont steeringFont("Quicksand", 8, QFont::Bold);

0 commit comments

Comments
 (0)