Skip to content

Commit

Permalink
Fix print format (#45)
Browse files Browse the repository at this point in the history
* Fix print format

* Fix

* Fix
  • Loading branch information
ToshikiNakamura0412 authored Nov 16, 2024
1 parent f6c0ce8 commit f92b166
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/motion_decision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,14 +607,12 @@ void MotionDecision::print_status(const geometry_msgs::Twist &cmd_vel)
if (battery_info_.used)
{
if (battery_info_.current_percentage < 25.0)
std::cout << "battery : " << RED << std::fixed << std::setprecision(1) << battery_info_.current_percentage
<< " %" << RESET_COLOR << std::endl;
std::cout << "battery : " << RED << battery_info_.current_percentage << " %" << RESET_COLOR << std::endl;
else if (battery_info_.current_percentage < 50.0)
std::cout << "battery : " << YELLOW << std::fixed << std::setprecision(1)
<< battery_info_.current_percentage << " %" << RESET_COLOR << std::endl;
std::cout << "battery : " << YELLOW << battery_info_.current_percentage << " %" << RESET_COLOR
<< std::endl;
else
std::cout << "battery : " << std::fixed << std::setprecision(1) << battery_info_.current_percentage
<< " %" << std::endl;
std::cout << "battery : " << battery_info_.current_percentage << " %" << std::endl;
}
if (laser_info_.front_min_range == -1.0)
std::cout << "min front laser : " << RED << laser_info_.front_min_range << RESET_COLOR << std::endl;
Expand Down

0 comments on commit f92b166

Please sign in to comment.