Commit d8d2eac5 authored by Rousseau Vincent's avatar Rousseau Vincent

fix timer arg

parent 6c3da0c1
cmake_minimum_required(VERSION 2.8.3)
project(ads1115_driver)
set(${PROJECT_NAME}_CATKIN_DEPS rospy)
set(${PROJECT_NAME}_CATKIN_DEPS rospy std_msgs)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
......
......@@ -13,10 +13,6 @@
<buildtool_depend>catkin</buildtool_depend>
<depend>rospy</depend>
<exec_depend>std_msgs</exec_depend>
<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<depend>std_msgs</depend>
</package>
......@@ -42,7 +42,7 @@ class ADS1115(object):
self.timer = rospy.Timer(rospy.Duration(timer_period), self.timer_callback)
rospy.spin()
def timer_callback(self):
def timer_callback(self, event):
msg = Float32()
# Conversion in milli volt for gain 1
# https://github.com/kentegrate/rpi_drivers/blob/master/include/rpi_drivers/ads1115.hpp
......
[develop]
script-dir=$base/lib/ads1115_driver
[install]
install-scripts=$base/lib/ads1115_driver
from setuptools import find_packages
from setuptools import setup
package_name = 'ads1115_driver'
setup(
name=package_name,
version='0.1.0',
packages=find_packages(exclude=['test']),
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
],
install_requires=['setuptools'],
zip_safe=True,
author='Vincent Rousseau',
author_email='vincent.rousseau@irstea.fr',
maintainer='Vincent Rousseau',
maintainer_email='vincent.rousseau@irstea.fr',
keywords=['ROS'],
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Topic :: Software Development',
],
description=(
'Python ads1115_driver nodes'
),
license='Apache License, Version 2.0',
tests_require=['pytest'],
entry_points={
'console_scripts': [
'talker = scripts.talker:main',
],
},
)
# Copyright 2015 Open Source Robotics Foundation, Inc.
#
# 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.
from ament_copyright.main import main
def test_copyright():
rc = main(argv=['.', 'test'])
assert rc == 0, 'Found errors'
# Copyright 2017 Open Source Robotics Foundation, Inc.
#
# 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.
from ament_flake8.main import main
def test_flake8():
rc = main(argv=[])
assert rc == 0, 'Found errors'
# Copyright 2015 Open Source Robotics Foundation, Inc.
#
# 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.
from ament_pep257.main import main
def test_pep257():
rc = main(argv=['.', 'test'])
assert rc == 0, 'Found code style errors / warnings'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment