Skip to content

Commit

Permalink
Rebase from 'debian/noetic/fadecandy_driver'
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbinney committed Jul 7, 2020
1 parent 48419c1 commit 02452f1
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 46 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -2,6 +2,14 @@
Changelog for package fadecandy_driver
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.1.2 (2020-07-06)
------------------
* Merge pull request `#10 <https://github.com/iron-ox/fadecandy_ros/issues/10>`_ from eurogroep/chore/log-io-error
chore: log IO error
* Merge pull request `#9 <https://github.com/iron-ox/fadecandy_ros/issues/9>`_ from eurogroep/fix/rospy-shutdown
fix(shutdown): Shutdown gracefully when no connection was set-up
* Contributors: Rein Appeldoorn

0.1.1 (2020-06-03)
------------------
* Merge pull request `#7 <https://github.com/iron-ox/fadecandy_ros/issues/7>`_ from jonbinney/python3-fixes
Expand Down
15 changes: 0 additions & 15 deletions debian/changelog

This file was deleted.

7 changes: 7 additions & 0 deletions debian/changelog.em
@@ -0,0 +1,7 @@
@[for change_version, change_date, changelog, main_name, main_email in changelogs]@(Package) (@(change_version)@(DebianInc)@(Distribution)) @(Distribution); urgency=high

@(changelog)

-- @(main_name) <@(main_email)> @(change_date)

@[end for]
1 change: 0 additions & 1 deletion debian/compat

This file was deleted.

1 change: 1 addition & 0 deletions debian/compat.em
@@ -0,0 +1 @@
@(debhelper_version)
12 changes: 0 additions & 12 deletions debian/control

This file was deleted.

14 changes: 14 additions & 0 deletions debian/control.em
@@ -0,0 +1,14 @@
Source: @(Package)
Section: misc
Priority: optional
Maintainer: @(Maintainer)
Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(BuildDepends))
Homepage: @(Homepage)
Standards-Version: 3.9.2

Package: @(Package)
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, @(', '.join(Depends))
@[if Conflicts]Conflicts: @(', '.join(Conflicts))@\n@[end if]@
@[if Replaces]Replaces: @(', '.join(Replaces))@\n@[end if]@
Description: @(Description)
1 change: 1 addition & 0 deletions debian/copyright.em
@@ -0,0 +1 @@
@(Copyright)
3 changes: 0 additions & 3 deletions debian/gbp.conf

This file was deleted.

3 changes: 3 additions & 0 deletions debian/gbp.conf.em
@@ -0,0 +1,3 @@
[git-buildpackage]
upstream-tag=@(release_tag)
upstream-tree=tag
20 changes: 10 additions & 10 deletions debian/rules → debian/rules.em
Expand Up @@ -13,49 +13,49 @@ export DH_VERBOSE=1
# https://code.ros.org/trac/ros/ticket/2977
# https://code.ros.org/trac/ros/ticket/3842
export LDFLAGS=
export PKG_CONFIG_PATH=/opt/ros/noetic/lib/pkgconfig
export PKG_CONFIG_PATH=@(InstallationPrefix)/lib/pkgconfig
# Explicitly enable -DNDEBUG, see:
# https://github.com/ros-infrastructure/bloom/issues/327
export DEB_CXXFLAGS_MAINT_APPEND=-DNDEBUG

%:
dh $@ -v --buildsystem=cmake
dh $@@ -v --buildsystem=cmake

override_dh_auto_configure:
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it. It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
dh_auto_configure -- \
-DCATKIN_BUILD_BINARY_PACKAGE="1" \
-DCMAKE_INSTALL_PREFIX="/opt/ros/noetic" \
-DCMAKE_PREFIX_PATH="/opt/ros/noetic"
-DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \
-DCMAKE_PREFIX_PATH="@(InstallationPrefix)"

override_dh_auto_build:
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it. It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
dh_auto_build

override_dh_auto_test:
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it. It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
echo -- Running tests. Even if one of them fails the build is not canceled.
if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
dh_auto_test || true

override_dh_shlibdeps:
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it. It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \
dh_shlibdeps -l$(CURDIR)/debian/ros-noetic-fadecandy-driver//opt/ros/noetic/lib/
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
dh_shlibdeps -l$(CURDIR)/debian/@(Package)/@(InstallationPrefix)/lib/

override_dh_auto_install:
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it. It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "/opt/ros/noetic/setup.sh" ]; then . "/opt/ros/noetic/setup.sh"; fi && \
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
dh_auto_install
1 change: 0 additions & 1 deletion debian/source/format

This file was deleted.

1 change: 1 addition & 0 deletions debian/source/format.em
@@ -0,0 +1 @@
3.0 (@(format))
3 changes: 2 additions & 1 deletion debian/source/options → debian/source/options.em
@@ -1,5 +1,6 @@
@[if format and format == 'quilt']@
# Automatically add upstream changes to the quilt overlay.
# http://manpages.ubuntu.com/manpages/trusty/man1/dpkg-source.1.html
# This supports reusing the orig.tar.gz for debian increments.
auto-commit

@[end if]
2 changes: 1 addition & 1 deletion package.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>fadecandy_driver</name>
<version>0.1.1</version>
<version>0.1.2</version>
<description>ROS driver for fadecandy LED controllers</description>

<maintainer email="jon.binney@ironox.com">Jon Binney</maintainer>
Expand Down
6 changes: 4 additions & 2 deletions src/fadecandy_driver/fadecandy_node.py
Expand Up @@ -11,12 +11,14 @@ def __init__(self):
while not rospy.is_shutdown():
try:
self._driver = FadecandyDriver()
except IOError:
rospy.logwarn_once('Failed to connect to Fadecandy device; will retry every second')
except IOError as e:
rospy.logwarn_once('Failed to connect to Fadecandy device: %s; will retry every second', e)
else:
rospy.loginfo('Connected to Fadecandy device')
break
connection_retry_rate.sleep()
else:
return

self._set_leds_sub = rospy.Subscriber('set_leds', LEDArray, self._set_leds)

Expand Down

0 comments on commit 02452f1

Please sign in to comment.