Skip to content

Commit 150b666

Browse files
committed
Adapted Jazzy code style
1 parent 70c9f27 commit 150b666

File tree

7 files changed

+198
-170
lines changed

7 files changed

+198
-170
lines changed

raspimouse_fake/include/raspimouse_fake/fake_raspimouse_component.hpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2020
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22-
2322
#ifndef RASPIMOUSE_FAKE__FAKE_RASPIMOUSE_COMPONENT_HPP_
2423
#define RASPIMOUSE_FAKE__FAKE_RASPIMOUSE_COMPONENT_HPP_
2524

2625
#include <memory>
26+
2727
#include "raspimouse_fake/visibility_control.h"
2828
#include "rclcpp/rclcpp.hpp"
2929
#include "rclcpp_lifecycle/lifecycle_node.hpp"
@@ -42,16 +42,16 @@ class Raspimouse : public rclcpp_lifecycle::LifecycleNode
4242
private:
4343
rclcpp::Service<std_srvs::srv::SetBool>::SharedPtr motor_power_service_;
4444

45-
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
46-
on_configure(const rclcpp_lifecycle::State &);
47-
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
48-
on_activate(const rclcpp_lifecycle::State &);
49-
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
50-
on_deactivate(const rclcpp_lifecycle::State &);
51-
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
52-
on_cleanup(const rclcpp_lifecycle::State &);
53-
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
54-
on_shutdown(const rclcpp_lifecycle::State &);
45+
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_configure(
46+
const rclcpp_lifecycle::State &);
47+
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_activate(
48+
const rclcpp_lifecycle::State &);
49+
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_deactivate(
50+
const rclcpp_lifecycle::State &);
51+
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_cleanup(
52+
const rclcpp_lifecycle::State &);
53+
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_shutdown(
54+
const rclcpp_lifecycle::State &);
5555

5656
void handle_motor_power(
5757
const std::shared_ptr<rmw_request_id_t> request_header,

raspimouse_fake/include/raspimouse_fake/visibility_control.h

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,44 +19,42 @@
1919
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2020
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22-
2322
#ifndef RASPIMOUSE_FAKE__VISIBILITY_CONTROL_H_
2423
#define RASPIMOUSE_FAKE__VISIBILITY_CONTROL_H_
2524

2625
#ifdef __cplusplus
27-
extern "C"
28-
{
26+
extern "C" {
2927
#endif
3028

3129
// This logic was borrowed (then namespaced) from the examples on the gcc wiki:
3230
// https://gcc.gnu.org/wiki/Visibility
3331

3432
#if defined _WIN32 || defined __CYGWIN__
35-
#ifdef __GNUC__
36-
#define RASPIMOUSE_FAKE_EXPORT __attribute__ ((dllexport))
37-
#define RASPIMOUSE_FAKE_IMPORT __attribute__ ((dllimport))
38-
#else
39-
#define RASPIMOUSE_FAKE_EXPORT __declspec(dllexport)
40-
#define RASPIMOUSE_FAKE_IMPORT __declspec(dllimport)
41-
#endif
42-
#ifdef RASPIMOUSE_FAKE_BUILDING_DLL
43-
#define RASPIMOUSE_FAKE_PUBLIC RASPIMOUSE_FAKE_EXPORT
44-
#else
45-
#define RASPIMOUSE_FAKE_PUBLIC RASPIMOUSE_FAKE_IMPORT
46-
#endif
47-
#define RASPIMOUSE_FAKE_PUBLIC_TYPE RASPIMOUSE_FAKE_PUBLIC
48-
#define RASPIMOUSE_FAKE_LOCAL
33+
#ifdef __GNUC__
34+
#define RASPIMOUSE_FAKE_EXPORT __attribute__((dllexport))
35+
#define RASPIMOUSE_FAKE_IMPORT __attribute__((dllimport))
36+
#else
37+
#define RASPIMOUSE_FAKE_EXPORT __declspec(dllexport)
38+
#define RASPIMOUSE_FAKE_IMPORT __declspec(dllimport)
39+
#endif
40+
#ifdef RASPIMOUSE_FAKE_BUILDING_DLL
41+
#define RASPIMOUSE_FAKE_PUBLIC RASPIMOUSE_FAKE_EXPORT
4942
#else
50-
#define RASPIMOUSE_FAKE_EXPORT __attribute__ ((visibility("default")))
51-
#define RASPIMOUSE_FAKE_IMPORT
52-
#if __GNUC__ >= 4
53-
#define RASPIMOUSE_FAKE_PUBLIC __attribute__ ((visibility("default")))
54-
#define RASPIMOUSE_FAKE_LOCAL __attribute__ ((visibility("hidden")))
55-
#else
56-
#define RASPIMOUSE_FAKE_PUBLIC
57-
#define RASPIMOUSE_FAKE_LOCAL
58-
#endif
59-
#define RASPIMOUSE_FAKE_PUBLIC_TYPE
43+
#define RASPIMOUSE_FAKE_PUBLIC RASPIMOUSE_FAKE_IMPORT
44+
#endif
45+
#define RASPIMOUSE_FAKE_PUBLIC_TYPE RASPIMOUSE_FAKE_PUBLIC
46+
#define RASPIMOUSE_FAKE_LOCAL
47+
#else
48+
#define RASPIMOUSE_FAKE_EXPORT __attribute__((visibility("default")))
49+
#define RASPIMOUSE_FAKE_IMPORT
50+
#if __GNUC__ >= 4
51+
#define RASPIMOUSE_FAKE_PUBLIC __attribute__((visibility("default")))
52+
#define RASPIMOUSE_FAKE_LOCAL __attribute__((visibility("hidden")))
53+
#else
54+
#define RASPIMOUSE_FAKE_PUBLIC
55+
#define RASPIMOUSE_FAKE_LOCAL
56+
#endif
57+
#define RASPIMOUSE_FAKE_PUBLIC_TYPE
6058
#endif
6159

6260
#ifdef __cplusplus

raspimouse_fake/src/fake_raspimouse_component.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@
1919
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2020
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22-
2322
#include "raspimouse_fake/fake_raspimouse_component.hpp"
2423

25-
#include "rclcpp/rclcpp.hpp"
2624
#include "lifecycle_msgs/srv/change_state.hpp"
25+
#include "rclcpp/rclcpp.hpp"
2726
#include "std_srvs/srv/set_bool.hpp"
2827

2928
using namespace std::chrono_literals;

raspimouse_gazebo/launch/raspimouse_with_color_objects.launch.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,26 @@
2424
from ament_index_python.packages import get_package_share_directory
2525
from launch import LaunchDescription
2626
from launch.actions import IncludeLaunchDescription
27-
from launch_ros.actions import SetParameter
2827
from launch.launch_description_sources import PythonLaunchDescriptionSource
28+
from launch_ros.actions import SetParameter
2929

3030

3131
def generate_launch_description():
3232
world_file = os.path.join(
3333
get_package_share_directory('raspimouse_gazebo'),
3434
'worlds',
35-
'color_objects_world.sdf')
35+
'color_objects_world.sdf',
36+
)
3637
world_launch = IncludeLaunchDescription(
37-
PythonLaunchDescriptionSource([
38-
get_package_share_directory('raspimouse_gazebo'),
39-
'/launch/raspimouse_with_emptyworld.launch.py']),
40-
launch_arguments={
41-
'world_name': world_file
42-
}.items()
38+
PythonLaunchDescriptionSource(
39+
[
40+
get_package_share_directory('raspimouse_gazebo'),
41+
'/launch/raspimouse_with_emptyworld.launch.py',
42+
]
43+
),
44+
launch_arguments={'world_name': world_file}.items(),
4345
)
4446

45-
return LaunchDescription([
46-
SetParameter(name='use_sim_time', value=True),
47-
world_launch
48-
])
47+
return LaunchDescription(
48+
[SetParameter(name='use_sim_time', value=True), world_launch]
49+
)

0 commit comments

Comments
 (0)