Skip to content

Commit

Permalink
style(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jan 14, 2025
1 parent 39df15a commit 94a7e63
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ void RedundancyRelayManager::onMainElectionStatus(

if (is_relaying_) {
if (tmp_election_status == nullptr) return;
if (operation_mode_state->mode != autoware_adapi_v1_msgs::msg::OperationModeState::AUTONOMOUS) return;
if (((msg->path_info >> 3) & 0x01) == 1 || ((tmp_election_status->path_info >> 3) & 0x01) == 0) return;
if (operation_mode_state->mode != autoware_adapi_v1_msgs::msg::OperationModeState::AUTONOMOUS)
return;
if (((msg->path_info >> 3) & 0x01) == 1 || ((tmp_election_status->path_info >> 3) & 0x01) == 0)
return;

requestTopicRelayControl(false, client_relay_trajectory_, "topic_relay_control_trajectory");
requestTopicRelayControl(
Expand Down Expand Up @@ -87,8 +89,10 @@ void RedundancyRelayManager::onSubElectionStatus(

if (is_relaying_) {
if (tmp_election_status == nullptr) return;
if (operation_mode_state->mode != autoware_adapi_v1_msgs::msg::OperationModeState::AUTONOMOUS) return;
if (((msg->path_info >> 3) & 0x01) == 1 || ((tmp_election_status->path_info >> 3) & 0x01) == 0) return;
if (operation_mode_state->mode != autoware_adapi_v1_msgs::msg::OperationModeState::AUTONOMOUS)
return;
if (((msg->path_info >> 3) & 0x01) == 1 || ((tmp_election_status->path_info >> 3) & 0x01) == 0)
return;

requestTopicRelayControl(false, client_relay_trajectory_, "topic_relay_control_trajectory");
requestTopicRelayControl(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#define REDUNDANCY_RELAY_MANAGER_NODE_HPP_

// ROS 2 core
#include <autoware/universe_utils/ros/polling_subscriber.hpp>
#include <rclcpp/rclcpp.hpp>

#include <autoware/universe_utils/ros/polling_subscriber.hpp>
#include <autoware_adapi_v1_msgs/msg/operation_mode_state.hpp>
#include <tier4_system_msgs/msg/election_status.hpp>
#include <tier4_system_msgs/srv/change_topic_relay_control.hpp>
Expand All @@ -41,7 +41,8 @@ class RedundancyRelayManager : public rclcpp::Node
// Params
NodeParam node_param_;
// Subscribers
autoware::universe_utils::InterProcessPollingSubscriber<autoware_adapi_v1_msgs::msg::OperationModeState>
autoware::universe_utils::InterProcessPollingSubscriber<
autoware_adapi_v1_msgs::msg::OperationModeState>
sub_operation_mode_state_{this, "~/input/operation_mode/state"};
rclcpp::Subscription<tier4_system_msgs::msg::ElectionStatus>::SharedPtr sub_main_election_status_;
rclcpp::Subscription<tier4_system_msgs::msg::ElectionStatus>::SharedPtr sub_sub_election_status_;
Expand Down

0 comments on commit 94a7e63

Please sign in to comment.