Skip to content

Commit 671e66b

Browse files
authored
Merge pull request #1433 from peternewman/master-resync
Master resync
2 parents dd13514 + 8c33249 commit 671e66b

File tree

10 files changed

+77
-30
lines changed

10 files changed

+77
-30
lines changed

.travis.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,38 +45,44 @@ matrix:
4545
env:
4646
- TASK='compile'
4747
- CPPUNIT='1.13'
48+
- LIBFTDI='0'
4849
- os: osx
4950
osx_image: xcode9.3
5051
compiler: clang
5152
env:
5253
- TASK='compile'
5354
- CPPUNIT='1.14'
55+
- LIBFTDI='0'
5456
- os: osx
5557
osx_image: xcode9.3
5658
compiler: gcc
5759
env:
5860
- TASK='compile'
5961
- CPPUNIT='1.13'
62+
- LIBFTDI='0'
6063
- os: osx
6164
osx_image: xcode9.3
6265
compiler: gcc
6366
env:
6467
- TASK='compile'
6568
- CPPUNIT='1.14'
66-
    - os: osx
67-
osx_image: xcode9.2
69+
- LIBFTDI='0'
70+
- os: osx
71+
osx_image: xcode9.3
6872
compiler: clang
6973
env:
7074
- TASK='compile'
7175
- CPPUNIT='1.14'
7276
- PROTOBUF='3.5'
77+
- LIBFTDI='1'
7378
- os: osx
74-
osx_image: xcode9.2
79+
osx_image: xcode9.3
7580
compiler: gcc
7681
env:
7782
- TASK='compile'
7883
- CPPUNIT='1.14'
7984
- PROTOBUF='3.5'
85+
- LIBFTDI='1'
8086
- os: linux
8187
dist: trusty
8288
compiler: clang
@@ -289,7 +295,9 @@ before_install:
289295
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew reinstall -s libtool; fi
290296
#Fix a broken homebrew python upgrade - see https://github.com/Homebrew/homebrew-core/issues/26358
291297
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python || true; fi
292-
 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache bison flex libftdi libftdi0 libusb liblo libmicrohttpd; fi # ossp-uuid, homebrew/python/numpy already present
298+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache bison flex liblo libmicrohttpd; fi # ossp-uuid, homebrew/python/numpy and libusb already present
299+
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$LIBFTDI" != "1" ]; then brew install libftdi0; fi # install libftdi0
300+
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$LIBFTDI" == "1" ]; then brew install libftdi; fi # install the latest libftdi
293301
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$PROTOBUF" == "3.5" ]; then brew install protobuf@3.5; fi
294302
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$PROTOBUF" != "3.5" ]; then brew install protobuf@3.1; fi
295303
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$PROTOBUF" != "3.5" ]; then brew link -f protobuf@3.1; export PKG_CONFIG_PATH=/usr/local/opt/protobuf@3.1/lib/pkgconfig; brew install --build-from-source --ignore-dependencies --env=std protobuf-c; fi # When protobuf is not on the latest release

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Contributors:
88
Bastien Andrès, contributed to the dmx4linux plugin
99
Carsten Presser, Karate USB plugin
1010
Dave Olsthoorn, working on a new web-ui
11+
E.S. Rosenberg, further work on ftdidmx plugin.
1112
Florian Edelmann, added DMXCreator 512 Basic USB and native SPI DMX support
1213
Hakan Lindestaf, Renard plugin
1314
Harry F, for the Eurolite USB Pro code

configure.ac

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -612,19 +612,33 @@ AC_ARG_ENABLE(
612612
[ja-rule],
613613
[AS_HELP_STRING([--enable-ja-rule], [Build the Ja Rule test tool])])
614614

615-
# libftdi: this requires libusb-0.1.4+ don't know if I should also
615+
# libftdi0: this requires libusb-0.1.4+ don't know if I should also
616616
# check for it, since the libusb check above is not for 0.1.4 but for libusb-1
617617
AC_ARG_ENABLE(
618618
[libftdi],
619619
[AS_HELP_STRING([--disable-libftdi],
620-
[Avoid using libftdi even if it exists])])
620+
[Avoid using libftdi0 or libftdi1 even if either exists])])
621621

622-
have_libftdi="no"
622+
have_libftdi0="no"
623+
AS_IF([test "x$enable_libftdi" != xno],
624+
[PKG_CHECK_MODULES([libftdi0], [libftdi >= 0.18], [have_libftdi0="yes"],
625+
[true])])
626+
AM_CONDITIONAL([HAVE_LIBFTDI0], [test "x$have_libftdi0" = xyes])
627+
AS_IF([test "x$have_libftdi0" = xyes],
628+
[AC_DEFINE([HAVE_LIBFTDI0], [1], [define if libftdi0 is installed])])
629+
have_libftdi1="no"
623630
AS_IF([test "x$enable_libftdi" != xno],
624-
[PKG_CHECK_MODULES([libftdi], [libftdi >= 0.18], [have_libftdi="yes"],
631+
[PKG_CHECK_MODULES([libftdi1], [libftdi1 >= 1.0], [have_libftdi1="yes"],
625632
[true])])
633+
AM_CONDITIONAL([HAVE_LIBFTDI1], [test "x$have_libftdi1" = xyes])
634+
AS_IF([test "x$have_libftdi1" = xyes],
635+
[AC_DEFINE([HAVE_LIBFTDI1], [1], [define if libftdi1 is installed])])
636+
have_libftdi="no"
637+
if test "x$have_libftdi0" = xyes || test "x$have_libftdi1" = xyes; then
638+
have_libftdi="yes"
639+
fi
626640
AS_IF([test "x$have_libftdi" = xyes],
627-
[AC_DEFINE([HAVE_LIBFTDI], [1], [define if libftdi is installed])])
641+
[AC_DEFINE([HAVE_LIBFTDI], [1], [define if libftdi0 or libftdi1 is installed])])
628642

629643
# libusb
630644
AC_ARG_ENABLE(

debian/control

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ Source: ola
22
Priority: optional
33
Maintainer: Wouter Verhelst <wouter@debian.org>
44
Uploaders: RenZO <renzo@imaginux.com>
5-
Build-Depends: debhelper (>= 9), autotools-dev, dh-autoreconf, bash-completion, libcppunit-dev, bison, flex, pkg-config, uuid-dev, python, python-protobuf, python-numpy, libprotobuf-dev, protobuf-compiler, libprotoc-dev, libusb-1.0-0-dev, libftdi-dev, liblo-dev, libmicrohttpd-dev, libncurses5-dev
6-
Standards-Version: 3.9.5
5+
Build-Depends: debhelper (>= 9), autotools-dev, dh-autoreconf, bash-completion, libcppunit-dev, bison, flex, pkg-config, uuid-dev, python, python-protobuf, libprotobuf-dev, protobuf-compiler, libprotoc-dev, libusb-1.0-0-dev, libftdi-dev, liblo-dev, libmicrohttpd-dev, libncurses5-dev, python-numpy
6+
Standards-Version: 3.9.8
77
Section: libs
88
Vcs-Git: https://github.com/OpenLightingProject/ola.git
99
Vcs-browser: https://github.com/OpenLightingProject/ola
1010
Homepage: https://www.openlighting.org/
11-
Testsuite: autopkgtest
1211

1312
Package: libola-dev
1413
Section: libdevel
1514
Architecture: any
15+
Multi-Arch: same
1616
Depends: ola (= ${binary:Version}), ${misc:Depends}
1717
Description: Open Lighting Architecture - development libraries
1818
The DMX512 standard for Digital MultipleX is used for digital
@@ -42,7 +42,7 @@ Description: Open Lighting Architecture - Python Classes
4242
Package: ola-rdm-tests
4343
Section: libs
4444
Architecture: all
45-
Depends: ola (>= ${source:Version}), ola (<< ${source:Version}.~), ola-python (= ${binary:Version}), ${python:Depends}, ${misc:Depends}, python-numpy, libjs-jquery, libjs-jquery-ui
45+
Depends: ola (>= ${source:Version}), ola (<< ${source:Version}.~), ola-python (= ${binary:Version}), ${python:Depends}, ${misc:Depends}, python-numpy, libjs-jquery, libjs-jquery-ui, lsb-base
4646
Suggests: bash-completion
4747
Description: Open Lighting Architecture - RDM Responder Tests
4848
The DMX512 standard for Digital MultipleX is used for digital
@@ -62,7 +62,7 @@ Description: Open Lighting Architecture - RDM Responder Tests
6262
Package: ola
6363
Section: electronics
6464
Architecture: any
65-
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
65+
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base
6666
Suggests: bash-completion
6767
Description: Open Lighting Architecture
6868
The DMX512 standard for Digital MultipleX is used for digital
@@ -78,6 +78,7 @@ Description: Open Lighting Architecture
7878
Package: libola1
7979
Section: libs
8080
Architecture: any
81+
Multi-Arch: same
8182
Depends: ${shlibs:Depends}, ${misc:Depends}
8283
Pre-Depends: ${misc:Pre-Depends}
8384
Description: Open Lighting Architecture - shared libraries

debian/ola.udev

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
# Remember to update debian/org.openlighting.ola.ola.metainfo.xml when adding new devices
22

33
# udev rules for ftdi devices
4-
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", GROUP="plugdev"
4+
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", GROUP="plugdev", TAG+="uaccess"
55

66
# udev rules for the anyma dmx device
7-
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", GROUP="plugdev"
7+
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", GROUP="plugdev", TAG+="uaccess"
88

99
# udev rules for the avldiy dmx device
1010
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="8888", GROUP="plugdev"
1111

1212
# udev rules for the usbdmx2 dmx device
13-
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="0962", GROUP="plugdev"
13+
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="0962", GROUP="plugdev", TAG+="uaccess"
1414

1515
# udev rules for the velleman dmx device
16-
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="8062", GROUP="plugdev"
16+
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="8062", GROUP="plugdev", TAG+="uaccess"
1717

1818
# udev rules for the ShowJockey-DMX-U1 device
1919
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="57fe", GROUP="plugdev"
2020

2121
# udev rules for the DMXControl Projects e.V. Nodle U1
22-
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0830", GROUP="plugdev"
22+
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0830", GROUP="plugdev", TAG+="uaccess"
2323

2424
# udev rules for the DMXCreator 512 Basic device
2525
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="0a30", ATTRS{idProduct}=="0002", GROUP="plugdev"
2626

2727
# udev rules for the Eurolite
28-
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="fa63", GROUP="plugdev", MODE="660"
28+
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="fa63", GROUP="plugdev", MODE="660", TAG+="uaccess"
2929

3030
# udev rules file for the karate-device
3131
KERNEL=="ttyACM?", ATTRS{product}=="DMX2USB simple", SYMLINK+="kldmx0"
3232

3333
# udev rules file for the Scanlime Fadecandy device
34-
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="607a", GROUP="plugdev"
34+
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="607a", GROUP="plugdev", TAG+="uaccess"
3535

3636
# udev rules for Ja Rule
37-
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="aced", GROUP="plugdev", MODE="660"
38-
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="acee", GROUP="plugdev", MODE="660"
37+
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="aced", GROUP="plugdev", MODE="660", TAG+="uaccess"
38+
SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="acee", GROUP="plugdev", MODE="660", TAG+="uaccess"
3939

4040
# udev rules for SPI
4141
SUBSYSTEM=="spidev", MODE="0666"

include/ola/rdm/DimmerSubDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* @addtogroup rdm_resp
2222
* @{
2323
* @file DimmerSubDevice.h
24-
* @brief A soft responder that impements a SubDevice in DimmerResponder
24+
* @brief A soft responder that implements a SubDevice in DimmerResponder
2525
* @}
2626
*/
2727

olad/Makefile.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ olad_olad_LDADD = olad/libolaserver.la \
7272
common/libolacommon.la \
7373
ola/libola.la
7474

75-
if USE_FTDI
76-
olad_olad_LDADD += -lftdi -lusb
77-
endif
78-
7975
# TESTS
8076
##################################################
8177
test_programs += \

plugins/ftdidmx/FtdiWidget.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,18 @@
3232
* by E.S. Rosenberg a.k.a. Keeper of the Keys 5774/2014
3333
*/
3434

35-
#include <strings.h>
35+
#if HAVE_CONFIG_H
36+
#include <config.h>
37+
#endif // HAVE_CONFIG_H
38+
39+
#ifdef HAVE_LIBFTDI1
40+
#include <libftdi1/ftdi.h>
41+
#else
3642
#include <ftdi.h>
43+
#endif // HAVE_LIBFTDI1
44+
3745
#include <assert.h>
46+
#include <strings.h>
3847

3948
#include <string>
4049
#include <algorithm>
@@ -127,7 +136,11 @@ void FtdiWidget::Widgets(vector<FtdiWidgetInfo> *widgets) {
127136
ftdi_device_list* current_device = list;
128137

129138
while (current_device != NULL) {
139+
#if HAVE_LIBFTDI1
140+
struct libusb_device *dev = current_device->dev;
141+
#else
130142
struct usb_device *dev = current_device->dev;
143+
#endif // HAVE_LIBFTDI1
131144
current_device = current_device->next;
132145
i++;
133146

plugins/ftdidmx/FtdiWidget.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,16 @@
3535
#ifndef PLUGINS_FTDIDMX_FTDIWIDGET_H_
3636
#define PLUGINS_FTDIDMX_FTDIWIDGET_H_
3737

38+
#if HAVE_CONFIG_H
39+
#include <config.h>
40+
#endif // HAVE_CONFIG_H
41+
42+
#ifdef HAVE_LIBFTDI1
43+
#include <libftdi1/ftdi.h>
44+
#else
3845
#include <ftdi.h>
46+
#endif // HAVE_LIBFTDI1
47+
3948
#include <stdint.h>
4049
#include <string.h>
4150

plugins/ftdidmx/Makefile.mk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@ plugins_ftdidmx_libolaftdidmx_la_SOURCES = \
2121
plugins/ftdidmx/FtdiWidget.cpp \
2222
plugins/ftdidmx/FtdiWidget.h
2323
plugins_ftdidmx_libolaftdidmx_la_LIBADD = \
24-
$(libftdi_LIBS) \
2524
common/libolacommon.la \
2625
olad/plugin_api/libolaserverplugininterface.la
26+
if HAVE_LIBFTDI1
27+
plugins_ftdidmx_libolaftdidmx_la_LIBADD += $(libftdi1_LIBS)
28+
else
29+
plugins_ftdidmx_libolaftdidmx_la_LIBADD += $(libftdi0_LIBS)
30+
endif
31+
2732
endif
2833

2934
EXTRA_DIST += plugins/ftdidmx/README.md

0 commit comments

Comments
 (0)