Skip to content

Commit

Permalink
fixed cpplint
Browse files Browse the repository at this point in the history
  • Loading branch information
JatinPatil2003 committed Aug 16, 2024
1 parent 54da8f2 commit 55415cb
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 29 deletions.
50 changes: 31 additions & 19 deletions autonav_firmware/include/autonav_firmware/autonav_interface.hpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
#ifndef AUTONAV_INTERFACE_HPP
#define AUTONAV_INTERFACE_HPP
// Copyright (c) 2024 Jatin Patil
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include <rclcpp/rclcpp.hpp>
#include <hardware_interface/system_interface.hpp>
#include <rclcpp_lifecycle/state.hpp>
#include <rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp>
#ifndef AUTONAV_FIRMWARE__AUTONAV_INTERFACE_HPP_
#define AUTONAV_FIRMWARE__AUTONAV_INTERFACE_HPP_

#include <std_msgs/msg/int64_multi_array.hpp>
#include <std_msgs/msg/float64_multi_array.hpp>
#include <memory>
#include "hardware_interface/system_interface.hpp"
#include "rclcpp/rclcpp.hpp"
#include "rclcpp_lifecycle/state.hpp"
#include "rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp"
#include "std_msgs/msg/float64_multi_array.hpp"
#include "std_msgs/msg/int64_multi_array.hpp"

#include <vector>
#include <memory>
#include <string>

#include <vector>

namespace autonav_firmware
{
Expand All @@ -26,17 +38,17 @@ class AutonavInterface : public hardware_interface::SystemInterface
virtual ~AutonavInterface();

// Implementing rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface
virtual CallbackReturn on_activate(const rclcpp_lifecycle::State &) override;
virtual CallbackReturn on_deactivate(const rclcpp_lifecycle::State &) override;
CallbackReturn on_activate(const rclcpp_lifecycle::State &) override;
CallbackReturn on_deactivate(const rclcpp_lifecycle::State &) override;

// Implementing hardware_interface::SystemInterface
virtual CallbackReturn on_init(const hardware_interface::HardwareInfo & hardware_info) override;
virtual std::vector<hardware_interface::StateInterface> export_state_interfaces() override;
virtual std::vector<hardware_interface::CommandInterface> export_command_interfaces() override;
virtual hardware_interface::return_type read(
CallbackReturn on_init(const hardware_interface::HardwareInfo & hardware_info) override;
std::vector<hardware_interface::StateInterface> export_state_interfaces() override;
std::vector<hardware_interface::CommandInterface> export_command_interfaces() override;
hardware_interface::return_type read(
const rclcpp::Time &,
const rclcpp::Duration &) override;
virtual hardware_interface::return_type write(
hardware_interface::return_type write(
const rclcpp::Time &,
const rclcpp::Duration &) override;

Expand All @@ -56,4 +68,4 @@ class AutonavInterface : public hardware_interface::SystemInterface
};
} // namespace autonav_firmware

#endif // AUTONAV_INTERFACE_HPP
#endif // AUTONAV_FIRMWARE__AUTONAV_INTERFACE_HPP_
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#ifndef AUTONAV_INTERFACE_HPP
#define AUTONAV_INTERFACE_HPP

#include <rclcpp/rclcpp.hpp>
#include <hardware_interface/system_interface.hpp>
#include "hardware_interface/system_interface.hpp"
#include "rclcpp/rclcpp.hpp"
#include "rclcpp_lifecycle/state.hpp"
#include "rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp"
#include <serial/serial.h>
#include <rclcpp_lifecycle/state.hpp>
#include <rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp>

#include <vector>
#include <string>

#include <vector>

namespace autonav_firmware
{
Expand Down
19 changes: 16 additions & 3 deletions autonav_firmware/src/autonav_interface.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
#include "autonav_firmware/autonav_interface.hpp"
#include <std_msgs/msg/int64_multi_array.hpp>
#include <std_msgs/msg/float64_multi_array.hpp>
// Copyright (c) 2024 Jatin Patil
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include <chrono>
#include <cmath>
Expand All @@ -9,8 +19,11 @@
#include <memory>
#include <vector>

#include "autonav_firmware/autonav_interface.hpp"
#include "hardware_interface/types/hardware_interface_type_values.hpp"
#include "rclcpp/rclcpp.hpp"
#include "std_msgs/msg/float64_multi_array.hpp"
#include "std_msgs/msg/int64_multi_array.hpp"

namespace autonav_firmware
{
Expand Down
4 changes: 3 additions & 1 deletion autonav_firmware/src/autonav_interface_serial.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <cmath>

#include "autonav_firmware/autonav_interface.hpp"
#include "hardware_interface/types/hardware_interface_type_values.hpp"
#include <cmath>


namespace autonav_firmware
{
Expand Down

0 comments on commit 55415cb

Please sign in to comment.