Skip to content

Commit

Permalink
Merge branch '0.10' of https://github.com/OpenLightingProject/ola int…
Browse files Browse the repository at this point in the history
…o master-resync
  • Loading branch information
peternewman committed Jun 11, 2018
2 parents a10e50a + edbd478 commit 8c33249
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 16 deletions.
16 changes: 12 additions & 4 deletions .travis.yml
Expand Up @@ -45,38 +45,44 @@ matrix:
env:
- TASK='compile'
- CPPUNIT='1.13'
- LIBFTDI='0'
- os: osx
osx_image: xcode9.3
compiler: clang
env:
- TASK='compile'
- CPPUNIT='1.14'
- LIBFTDI='0'
- os: osx
osx_image: xcode9.3
compiler: gcc
env:
- TASK='compile'
- CPPUNIT='1.13'
- LIBFTDI='0'
- os: osx
osx_image: xcode9.3
compiler: gcc
env:
- TASK='compile'
- CPPUNIT='1.14'
    - os: osx
osx_image: xcode9.2
- LIBFTDI='0'
- os: osx
osx_image: xcode9.3
compiler: clang
env:
- TASK='compile'
- CPPUNIT='1.14'
- PROTOBUF='3.5'
- LIBFTDI='1'
- os: osx
osx_image: xcode9.2
osx_image: xcode9.3
compiler: gcc
env:
- TASK='compile'
- CPPUNIT='1.14'
- PROTOBUF='3.5'
- LIBFTDI='1'
- os: linux
dist: trusty
compiler: clang
Expand Down Expand Up @@ -289,7 +295,9 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew reinstall -s libtool; fi
#Fix a broken homebrew python upgrade - see https://github.com/Homebrew/homebrew-core/issues/26358
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python || true; fi
 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache bison flex libftdi libftdi0 libusb liblo libmicrohttpd; fi # ossp-uuid, homebrew/python/numpy already present
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache bison flex liblo libmicrohttpd; fi # ossp-uuid, homebrew/python/numpy and libusb already present
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$LIBFTDI" != "1" ]; then brew install libftdi0; fi # install libftdi0
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$LIBFTDI" == "1" ]; then brew install libftdi; fi # install the latest libftdi
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$PROTOBUF" == "3.5" ]; then brew install protobuf@3.5; fi
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$PROTOBUF" != "3.5" ]; then brew install protobuf@3.1; fi
- 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
Expand Down
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -8,6 +8,7 @@ Contributors:
Bastien Andrès, contributed to the dmx4linux plugin
Carsten Presser, Karate USB plugin
Dave Olsthoorn, working on a new web-ui
E.S. Rosenberg, further work on ftdidmx plugin.
Florian Edelmann, added DMXCreator 512 Basic USB and native SPI DMX support
Hakan Lindestaf, Renard plugin
Harry F, for the Eurolite USB Pro code
Expand Down
24 changes: 19 additions & 5 deletions configure.ac
Expand Up @@ -612,19 +612,33 @@ AC_ARG_ENABLE(
[ja-rule],
[AS_HELP_STRING([--enable-ja-rule], [Build the Ja Rule test tool])])

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

have_libftdi="no"
have_libftdi0="no"
AS_IF([test "x$enable_libftdi" != xno],
[PKG_CHECK_MODULES([libftdi0], [libftdi >= 0.18], [have_libftdi0="yes"],
[true])])
AM_CONDITIONAL([HAVE_LIBFTDI0], [test "x$have_libftdi0" = xyes])
AS_IF([test "x$have_libftdi0" = xyes],
[AC_DEFINE([HAVE_LIBFTDI0], [1], [define if libftdi0 is installed])])
have_libftdi1="no"
AS_IF([test "x$enable_libftdi" != xno],
[PKG_CHECK_MODULES([libftdi], [libftdi >= 0.18], [have_libftdi="yes"],
[PKG_CHECK_MODULES([libftdi1], [libftdi1 >= 1.0], [have_libftdi1="yes"],
[true])])
AM_CONDITIONAL([HAVE_LIBFTDI1], [test "x$have_libftdi1" = xyes])
AS_IF([test "x$have_libftdi1" = xyes],
[AC_DEFINE([HAVE_LIBFTDI1], [1], [define if libftdi1 is installed])])
have_libftdi="no"
if test "x$have_libftdi0" = xyes || test "x$have_libftdi1" = xyes; then
have_libftdi="yes"
fi
AS_IF([test "x$have_libftdi" = xyes],
[AC_DEFINE([HAVE_LIBFTDI], [1], [define if libftdi is installed])])
[AC_DEFINE([HAVE_LIBFTDI], [1], [define if libftdi0 or libftdi1 is installed])])

# libusb
AC_ARG_ENABLE(
Expand Down
2 changes: 1 addition & 1 deletion include/ola/rdm/DimmerSubDevice.h
Expand Up @@ -21,7 +21,7 @@
* @addtogroup rdm_resp
* @{
* @file DimmerSubDevice.h
* @brief A soft responder that impements a SubDevice in DimmerResponder
* @brief A soft responder that implements a SubDevice in DimmerResponder
* @}
*/

Expand Down
4 changes: 0 additions & 4 deletions olad/Makefile.mk
Expand Up @@ -72,10 +72,6 @@ olad_olad_LDADD = olad/libolaserver.la \
common/libolacommon.la \
ola/libola.la

if USE_FTDI
olad_olad_LDADD += -lftdi -lusb
endif

# TESTS
##################################################
test_programs += \
Expand Down
15 changes: 14 additions & 1 deletion plugins/ftdidmx/FtdiWidget.cpp
Expand Up @@ -32,9 +32,18 @@
* by E.S. Rosenberg a.k.a. Keeper of the Keys 5774/2014
*/

#include <strings.h>
#if HAVE_CONFIG_H
#include <config.h>
#endif // HAVE_CONFIG_H

#ifdef HAVE_LIBFTDI1
#include <libftdi1/ftdi.h>
#else
#include <ftdi.h>
#endif // HAVE_LIBFTDI1

#include <assert.h>
#include <strings.h>

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

while (current_device != NULL) {
#if HAVE_LIBFTDI1
struct libusb_device *dev = current_device->dev;
#else
struct usb_device *dev = current_device->dev;
#endif // HAVE_LIBFTDI1
current_device = current_device->next;
i++;

Expand Down
9 changes: 9 additions & 0 deletions plugins/ftdidmx/FtdiWidget.h
Expand Up @@ -35,7 +35,16 @@
#ifndef PLUGINS_FTDIDMX_FTDIWIDGET_H_
#define PLUGINS_FTDIDMX_FTDIWIDGET_H_

#if HAVE_CONFIG_H
#include <config.h>
#endif // HAVE_CONFIG_H

#ifdef HAVE_LIBFTDI1
#include <libftdi1/ftdi.h>
#else
#include <ftdi.h>
#endif // HAVE_LIBFTDI1

#include <stdint.h>
#include <string.h>

Expand Down
7 changes: 6 additions & 1 deletion plugins/ftdidmx/Makefile.mk
Expand Up @@ -21,9 +21,14 @@ plugins_ftdidmx_libolaftdidmx_la_SOURCES = \
plugins/ftdidmx/FtdiWidget.cpp \
plugins/ftdidmx/FtdiWidget.h
plugins_ftdidmx_libolaftdidmx_la_LIBADD = \
$(libftdi_LIBS) \
common/libolacommon.la \
olad/plugin_api/libolaserverplugininterface.la
if HAVE_LIBFTDI1
plugins_ftdidmx_libolaftdidmx_la_LIBADD += $(libftdi1_LIBS)
else
plugins_ftdidmx_libolaftdidmx_la_LIBADD += $(libftdi0_LIBS)
endif

endif

EXTRA_DIST += plugins/ftdidmx/README.md

0 comments on commit 8c33249

Please sign in to comment.