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 Oct 4, 2018
2 parents 5813fda + 30ea4d2 commit 5b1482d
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 35 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Expand Up @@ -263,6 +263,8 @@ matrix:

env:
global:
# No colours in terminal (to reduce log file size)
- TERM=dumb
# Parallel make build
- MAKEFLAGS="-j 2"
# -- BEGIN Coverity Scan ENV
Expand Down Expand Up @@ -331,6 +333,10 @@ before_install:
- if [ "$TASK" == "spellintian" -o "$TASK" == "spellintian-duplicates" ]; then sudo add-apt-repository ppa:waja/trusty-backports -y; sudo apt-get update -qq; sudo apt-get install lintian -y; fi # Install a late enough lintian

after_failure:
# Disabled as otherwise the logfile is too big
# - if [ -f ${TRAVIS_BUILD_DIR}/config.log ]; then cat ${TRAVIS_BUILD_DIR}/config.log; fi
- if [ -f ${TRAVIS_BUILD_DIR}/ola-*/_build/config.log ]; then cat ${TRAVIS_BUILD_DIR}/ola-*/_build/config.log; fi
- if [ -f ${TRAVIS_BUILD_DIR}/ola-*/_build/sub/config.log ]; then cat ${TRAVIS_BUILD_DIR}/ola-*/_build/sub/config.log; fi
- if [ -f ${TRAVIS_BUILD_DIR}/ola-*/_build/test-suite.log ]; then cat ${TRAVIS_BUILD_DIR}/ola-*/_build/test-suite.log; fi
- if [ -f ${TRAVIS_BUILD_DIR}/ola-*/_build/sub/test-suite.log ]; then cat ${TRAVIS_BUILD_DIR}/ola-*/_build/sub/test-suite.log; fi

Expand Down
9 changes: 8 additions & 1 deletion Makefile.am
Expand Up @@ -59,7 +59,7 @@ COMMON_TESTING_FLAGS_ONLY_WARNINGS = $(COMMON_CXXFLAGS_ONLY_WARNINGS) \
COMMON_TESTING_FLAGS = $(COMMON_TESTING_FLAGS_ONLY_WARNINGS)
COMMON_TESTING_PROTOBUF_FLAGS = $(COMMON_TESTING_FLAGS)

# The genererated protobuf files don't compile with -Werror on win32 so we
# The generated protobuf files don't compile with -Werror on win32 so we
# disable fatal warnings on WIN32.
if ! USING_WIN32
if FATAL_WARNINGS
Expand All @@ -71,6 +71,13 @@ if FATAL_WARNINGS
COMMON_TESTING_FLAGS += -Werror
COMMON_TESTING_PROTOBUF_FLAGS += -Werror -Wno-error=unused-parameter \
-Wno-error=deprecated-declarations

if GNU_PLUS_PLUS_11_DEPRECATIONS
# We have to use gnu++11 for some reason, so stop it complaining about
# auto_ptr
COMMON_CXXFLAGS += -Wno-error=deprecated-declarations
COMMON_TESTING_FLAGS += -Wno-error=deprecated-declarations
endif
endif
endif

Expand Down
1 change: 0 additions & 1 deletion common/base/LoggingTest.cpp
Expand Up @@ -71,7 +71,6 @@ void MockLogDestination::AddExpected(log_level level, string log_line) {
void MockLogDestination::Write(log_level level, const string &log_line) {
vector<string> tokens;
ola::StringSplit(log_line, &tokens, ":");
vector<string>::iterator iter;
OLA_ASSERT_EQ(tokens.size() , (size_t) 3);
OLA_ASSERT_GT(m_log_lines.size(), 0);
std::pair<log_level, string> expected_result = m_log_lines.at(0);
Expand Down
82 changes: 62 additions & 20 deletions configure.ac
Expand Up @@ -64,29 +64,70 @@ AC_MSG_RESULT($ac_cv_gnu_plus_plus_11)

AM_CONDITIONAL([SUPPORTS_GNU_PLUS_PLUS_11], [test "x$ac_cv_gnu_plus_plus_11" = xyes])

# This checks whether random needs gnu++11 or not, it doesn't set HAVE_RANDOM
# (as it's using AC_CHECK_HEADER not HEADERS), we do that later as normal
# We don't pass the compiler flag to the preprocessor (CPPFLAGS) because that
# variable is used by the C preprocessor too, and some of the pthread checks
# test for C code, which complains it doesn't understand gnu++. We may
# therefore generate some warnings in configure, but it should all work!
ac_cv_header_random_98="no"
ac_cv_header_random_11="no"

AC_MSG_NOTICE([checking for random gnu++98 compatibility])
old_cxxflags=$CXXFLAGS
CXXFLAGS="${CXXFLAGS} -std=gnu++98 -Wall -Werror"
# Manually purge the cache
AS_UNSET([ac_cv_header_random])
AC_CHECK_HEADER(
[random],
[ac_cv_header_random_98="yes"],
[ac_cv_header_random_98="no"])
# Manually purge the cache
AS_UNSET([ac_cv_header_random])
CXXFLAGS=$old_cxxflags

AS_IF([test "x$ac_cv_gnu_plus_plus_11" = xyes],
[AC_MSG_NOTICE([checking for random gnu++11 compatibility])
old_cxxflags=$CXXFLAGS
CXXFLAGS="${CXXFLAGS} -std=gnu++11 -Wall -Werror"
# Manually purge the cache
AS_UNSET([ac_cv_header_random])
AC_CHECK_HEADER(
[random],
[ac_cv_header_random_11=yes],
[ac_cv_header_random_11=no])
# Manually purge the cache
AS_UNSET([ac_cv_header_random])
CXXFLAGS=$old_cxxflags])

# force us into gnu++98 mode if necessary
# If gnu++11 and gnu++98 then
# If protobuf < 3.6
# If no unit tests, force to gnu++98
# Else we have unit tests
# If cppunit < 1.14.0, force to gnu++98
# Else turn off deprecation messages for std::auto_ptr and run gnu++11
# Else assume we have protobuf >= 3.6 (later checks will confirm that for certain), turn off deprecation messages for std::auto_ptr and run gnu++11
# If random works with gnu++98
# If protobuf < 3.6
# If no unit tests, force to gnu++98
# Else we have unit tests
# If cppunit < 1.14.0, force to gnu++98
# Else turn off deprecation messages for std::auto_ptr and run gnu++11
# Else assume we have protobuf >= 3.6 (later checks will confirm that for certain), turn off deprecation messages for std::auto_ptr and run gnu++11
# Else turn off deprecation messages for std::auto_ptr and run gnu++11
require_gnu_plus_plus_11="no"
AS_IF([test "x$ac_cv_gnu_plus_plus_11" = xyes],
[AS_IF([test "x$ac_cv_gnu_plus_plus_98" = xyes],
[PKG_CHECK_MODULES([PROTOBUF1], [protobuf < 3.6],
[AS_IF([test "x$enable_unittests" = xno],
[CXXFLAGS="$CXXFLAGS -std=gnu++98"],
[PKG_CHECK_MODULES([CPPUNIT1], [cppunit < 1.14.0],
[CXXFLAGS="$CXXFLAGS -std=gnu++98"],
[PKG_CHECK_MODULES([CPPUNIT2], [cppunit >= 1.14.0],
[require_gnu_plus_plus_11="yes"],
[AC_MSG_WARN([OLA requires std::auto_ptr support.])])
])
])
],
[require_gnu_plus_plus_11="yes"])
[AS_IF([test "x$ac_cv_header_random_98" = xyes],
[PKG_CHECK_MODULES([PROTOBUF1], [protobuf < 3.6],
[AS_IF([test "x$enable_unittests" = xno],
[CXXFLAGS="$CXXFLAGS -std=gnu++98"],
[PKG_CHECK_MODULES([CPPUNIT1], [cppunit < 1.14.0],
[CXXFLAGS="$CXXFLAGS -std=gnu++98"],
[PKG_CHECK_MODULES([CPPUNIT2], [cppunit >= 1.14.0],
[require_gnu_plus_plus_11="yes"],
[AC_MSG_WARN([OLA requires std::auto_ptr support.])])
])
])
],
[require_gnu_plus_plus_11="yes"])
],
[require_gnu_plus_plus_11="yes"])
])
])
AS_IF([test "x$require_gnu_plus_plus_11" = xyes],
Expand Down Expand Up @@ -782,8 +823,9 @@ esac

AS_IF([test "x$with_uucp_lock" != x], [UUCPLOCK=$with_uucp_lock])
AS_IF([test -d $UUCPLOCK],
[AC_DEFINE_UNQUOTED(UUCP_LOCK_DIR, "$UUCPLOCK")],
AC_MSG_ERROR(No suitable lock directory))
[AC_DEFINE_UNQUOTED(UUCP_LOCK_DIR, "$UUCPLOCK")
AC_MSG_RESULT($UUCPLOCK)],
AC_MSG_ERROR(no suitable lock directory))

# Python wrappers & RDM Responder tests.
#####################################################
Expand Down
5 changes: 1 addition & 4 deletions plugins/pathport/PathportDevice.cpp
Expand Up @@ -63,9 +63,6 @@ PathportDevice::PathportDevice(PathportPlugin *owner,
* Start this device
*/
bool PathportDevice::StartHook() {
vector<ola::network::UDPSocket*> sockets;
vector<ola::network::UDPSocket*>::iterator iter;

uint32_t product_id;
if (!StringToInt(m_preferences->GetValue(K_NODE_ID_KEY), &product_id)) {
OLA_WARN << "Invalid node Id " << m_preferences->GetValue(K_NODE_ID_KEY);
Expand Down Expand Up @@ -111,7 +108,7 @@ bool PathportDevice::StartHook() {

m_plugin_adaptor->AddReadDescriptor(m_node->GetSocket());
m_timeout_id = m_plugin_adaptor->RegisterRepeatingTimeout(
ADVERTISTMENT_PERIOD_MS,
ADVERTISEMENT_PERIOD_MS,
NewCallback(this, &PathportDevice::SendArpReply));

return true;
Expand Down
2 changes: 1 addition & 1 deletion plugins/pathport/PathportDevice.h
Expand Up @@ -59,7 +59,7 @@ class PathportDevice: public ola::Device {

static const char PATHPORT_DEVICE_NAME[];
static const uint32_t PORTS_PER_DEVICE = 8;
static const int ADVERTISTMENT_PERIOD_MS = 6000;
static const int ADVERTISEMENT_PERIOD_MS = 6000;
};
} // namespace pathport
} // namespace plugin
Expand Down
2 changes: 1 addition & 1 deletion plugins/sandnet/SandNetDevice.cpp
Expand Up @@ -111,7 +111,7 @@ bool SandNetDevice::StartHook() {
m_plugin_adaptor->AddReadDescriptor(*iter);

m_timeout_id = m_plugin_adaptor->RegisterRepeatingTimeout(
ADVERTISTMENT_PERIOD_MS,
ADVERTISEMENT_PERIOD_MS,
NewCallback(this, &SandNetDevice::SendAdvertisement));

return true;
Expand Down
4 changes: 2 additions & 2 deletions plugins/sandnet/SandNetDevice.h
Expand Up @@ -60,8 +60,8 @@ class SandNetDevice: public ola::Device {
static const char SANDNET_DEVICE_NAME[];
// the number of input ports to create
static const unsigned int INPUT_PORTS = 8;
// send an advertistment every 2s.
static const int ADVERTISTMENT_PERIOD_MS = 2000;
// send an advertisement every 2s.
static const int ADVERTISEMENT_PERIOD_MS = 2000;
};
} // namespace sandnet
} // namespace plugin
Expand Down
12 changes: 7 additions & 5 deletions plugins/uartdmx/README.md
Expand Up @@ -12,18 +12,20 @@ http://eastertrail.blogspot.co.uk/2014/04/command-and-control-ii.html

## Config file: `ola-uartdmx.conf`

`enabled = true`
`enabled = true`
Enable this plugin (DISABLED by default).

`device = /dev/ttyACM0`
`device = /dev/ttyAMA0`
The device to use for DMX output (optional). Multiple devices are supported
if the hardware exists. Using USB-serial adapters is not supported (try the
if the hardware exists. On later software it may also be /dev/serial0.
Using USB-serial adapters is not supported (try the
*ftdidmx* plugin instead).


### Per Device Settings (using above device name)

`<device>-break = 100`
`<device>-break = 100`
The DMX break time in microseconds for this device (optional).

`<device>-malf = 100`
`<device>-malf = 100`
The Mark After Last Frame time in microseconds for this device (optional).

0 comments on commit 5b1482d

Please sign in to comment.