Merge remote-tracking branch 'origin/master' into feature/knx

This commit is contained in:
John
2022-08-27 18:24:41 +02:00
15 changed files with 50 additions and 19 deletions
+5 -1
View File
@@ -29,6 +29,10 @@ jobs:
-
name: checkout
uses: actions/checkout@v2
-
name: gh-describe
id: gittag
uses: proudust/gh-describe@v1.4.6
-
name: set up QEMU
uses: docker/setup-qemu-action@v1
@@ -46,4 +50,4 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: build
run: cd contrib/docker && LIMITARCH=${{ github.event.inputs.limitarch }} ./build.sh
run: cd contrib/docker && LIMITARCH=${{ github.event.inputs.limitarch }} GIT_REVISION=${{ steps.gittag.outputs.describe }} ./build.sh
+4 -2
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.7.1 FATAL_ERROR)
# CMP0075 Include file check macros honor CMAKE_REQUIRED_LIBRARIES
# For more information see: https://cmake.org/cmake/help/latest/policy/CMP0075.html
@@ -42,7 +42,9 @@ endif(NOT REVISION)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g -O0 -ggdb -fsanitize=address -fno-omit-frame-pointer")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_INSTALL_PREFIX "")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "" CACHE PATH "..." FORCE)
endif()
include(GNUInstallDirs)
include(CheckFunctionExists)
include(CheckCXXSourceRuns)
+9
View File
@@ -1,3 +1,12 @@
# 22.4 (tbd)
## Bug Fixes
* fix some smaller glitches
* fix revision in gh build for update check
## Features
* add continuation of initial scan until it succeeded
# 22.3 (2022-05-08)
## Bug Fixes
* fix potential race condition in connection handling
+6 -2
View File
@@ -147,8 +147,12 @@ AC_DEFINE_UNQUOTED(PACKAGE_LOGFILE, LOCALSTATEDIR "/log/" PACKAGE ".log", [The p
AC_DEFINE(SCAN_VERSION, "[m4_esyscmd_s([sed -e 's#^\([0-9]*\.[0-9]*\).*#\1#' -e 's#\.\([0-9]\)$#0\1#' -e 's#\.##' VERSION])]", [The version of the package formatted for the scan result.])
AC_DEFINE(PACKAGE_VERSION_MAJOR, "[m4_esyscmd_s([sed -e 's#^\([0-9]*\)\..*$#\1#' VERSION])]", [The major version of the package.])
AC_DEFINE(PACKAGE_VERSION_MINOR, "[m4_esyscmd_s([sed -e 's#^.*\.\([0-9]*\)$#\1#' VERSION])]", [The minor version of the package.])
AC_DEFINE(REVISION, "[m4_esyscmd_s([git describe --always 2>/dev/null || (date +p%Y%m%d)])]", [The revision of the package.])
AC_ARG_VAR(GIT_REVISION, [Predefined value to use for revision instead of running git describe.])
if test -n "$GIT_REVISION"; then
AC_DEFINE(REVISION, "[m4_esyscmd_s([echo "$GIT_REVISION"])]", [The revision of the package.])
else
AC_DEFINE(REVISION, "[m4_esyscmd_s([git describe --always 2>/dev/null || (date +p%Y%m%d)])]", [The revision of the package.])
fi
AC_CHECK_PROGS([HAVE_DOXYGEN], [doxygen], [])
if test -z "$HAVE_DOXYGEN"; then
AC_MSG_WARN([Doxygen not found - continuing without Doxygen support.])
+3 -1
View File
@@ -13,12 +13,14 @@ WORKDIR /build
ARG TARGETARCH
ARG TARGETVARIANT
ARG EBUSD_VERSION
ARG GIT_REVISION
ENV EBUSD_ARCH $TARGETARCH$TARGETVARIANT
ENV EBUSD_VERSION $EBUSD_VERSION
ENV GIT_REVISION $GIT_REVISION
ADD . /build
RUN RUNTEST=full ./make_debian.sh
RUN RUNTEST=full GIT_REVISION=$GIT_REVISION ./make_debian.sh
+3 -1
View File
@@ -13,12 +13,14 @@ WORKDIR /build
ARG TARGETARCH
ARG TARGETVARIANT
ARG EBUSD_VERSION
ARG GIT_REVISION
ENV EBUSD_ARCH $TARGETARCH$TARGETVARIANT
ENV EBUSD_VERSION $EBUSD_VERSION
ENV GIT_REVISION $GIT_REVISION
ADD . /build
RUN ./make_debian.sh
RUN GIT_REVISION=$GIT_REVISION ./make_debian.sh
+2
View File
@@ -13,9 +13,11 @@ WORKDIR /build
ARG TARGETARCH
ARG TARGETVARIANT
ARG EBUSD_VERSION
ARG GIT_REVISION
ENV EBUSD_ARCH $TARGETARCH$TARGETVARIANT
ENV EBUSD_VERSION $EBUSD_VERSION
ENV GIT_REVISION $GIT_REVISION
ADD . /build
RUN %EBUSD_MAKE%
+7
View File
@@ -75,3 +75,10 @@ environment variables with the prefix `EBUSD_`, e.g. the following line can be u
> docker run -d --name=ebusd --device=/dev/ttyUSB0 -p 8888 -e EBUSD_SCANCONFIG= -e EBUSD_DEVICE=/dev/ttyUSB0 -e EBUSD_MQTTPORT=1883 -e EBUSD_MQTTHOST=BROKERHOST john30/ebusd
This eases use of e.g. docker-compose files.
Hints for running on arm32v7 host with Ubuntu 20.04
---------------------------------------------------
If the system time in the container is invalid, then retrieval of CSVs from the config webservice through HTTPS does not
work. This is due to an issue with an outdated [libseccomp library](https://github.com/moby/moby/issues/40734) on the host.
To circumvent this behaviour, updating the library might help as mentioned [here](https://serverfault.com/questions/1037146/docker-container-with-random-date/1048351#1048351).
+1
View File
@@ -58,6 +58,7 @@ for image in $images; do
--build-arg "UPLOAD_URL=$UPLOAD_URL" \
--build-arg "UPLOAD_CREDENTIALS=$UPLOAD_CREDENTIALS" \
--build-arg "UPLOAD_OS=$image" \
--build-arg "GIT_REVISION=$GIT_REVISION" \
-t $tagprefix$tagsuffix \
$extratag \
$output \
+3 -3
View File
@@ -15,7 +15,7 @@ function replaceTemplate () {
# devel update
version_variant='-devel'
make='RUNTEST=full ./make_debian.sh'
make='RUNTEST=full GIT_REVISION=\$GIT_REVISION ./make_debian.sh'
upload_lines=''
copydeb='COPY --from=build /build/ebusd-*_mqtt1.deb ebusd.deb'
debsrc='ebusd.deb \&\& rm -f ebusd.deb'
@@ -25,7 +25,7 @@ replaceTemplate
# release update
version_variant=''
make='./make_debian.sh'
make='GIT_REVISION=\$GIT_REVISION ./make_debian.sh'
copydeb="ADD https://github.com/john30/ebusd/releases/download/v\${EBUSD_VERSION}/ebusd-\${EBUSD_VERSION}_\${TARGETARCH}\${TARGETVARIANT}-\${EBUSD_IMAGE}_mqtt1.deb ebusd.deb"
copyentry='COPY contrib/docker/docker-entrypoint.sh /'
namesuffix='.release'
@@ -33,7 +33,7 @@ replaceTemplate
if [[ -n "$1" ]]; then
# build releases update
make='./make_all.sh'
make='GIT_REVISION=\$GIT_REVISION ./make_all.sh'
upload_lines='ARG UPLOAD_URL\nARG UPLOAD_CREDENTIALS\nARG UPLOAD_OS\nRUN if [ -n "\$UPLOAD_URL" ] \&\& [ -n "\$UPLOAD_CREDENTIALS" ]; then for img in ebusd-*.deb; do echo -n "upload \$img: "; curl -fsSk -u "\$UPLOAD_CREDENTIALS" -X POST --data-binary "@\$img" -H "Content-Type: application/octet-stream" "\$UPLOAD_URL/\$img?a=\$EBUSD_ARCH\&o=\$UPLOAD_OS\&v=\$EBUSD_VERSION" || echo "failed"; done; fi'
upload_lines+='\n\n\nFROM scratch as deb\nCOPY --from=build /build/*.deb /'
namesuffix='.build'
+1 -1
View File
@@ -232,7 +232,7 @@ static const struct argp_option argpoptions[] = {
{"acquiretimeout", O_ACQTIM, "MSEC", 0, "Stop bus acquisition after MSEC ms [10]", 0 },
{"acquireretries", O_ACQRET, "COUNT", 0, "Retry bus acquisition COUNT times [3]", 0 },
{"sendretries", O_SNDRET, "COUNT", 0, "Repeat failed sends COUNT times [2]", 0 },
{"receivetimeout", O_RCVTIM, "MSEC", 0, "Expect a slave to answer within MSEC us [25]", 0 },
{"receivetimeout", O_RCVTIM, "MSEC", 0, "Expect a slave to answer within MSEC ms [25]", 0 },
{"numbermasters", O_MASCNT, "COUNT", 0, "Expect COUNT masters on the bus, 0 for auto detection [0]", 0 },
{"generatesyn", O_GENSYN, nullptr, 0, "Enable AUTO-SYN symbol generation", 0 },
+1 -2
View File
@@ -291,8 +291,7 @@ void MainLoop::run() {
}
if (result != RESULT_OK) {
logError(lf_main, "initial scan failed: %s", getResultCode(result));
}
if (result != RESULT_ERR_NO_SIGNAL) {
} else {
reload = false;
}
}
+2 -2
View File
@@ -43,7 +43,7 @@ using std::setw;
using std::endl;
float uintToFloat(unsigned int value) {
float uintToFloat(unsigned int value, bool negative) {
#ifdef HAVE_DIRECT_FLOAT_FORMAT
# if HAVE_DIRECT_FLOAT_FORMAT == 2
value = __builtin_bswap32(value);
@@ -890,7 +890,7 @@ result_t NumberDataType::readFromRawValue(unsigned int value,
}
if (m_bitCount == 32) {
if (hasFlag(EXP)) { // IEEE 754 binary32
float val = uintToFloat(value);
float val = uintToFloat(value, negative);
if (val != val) { // !isnan(val)
if (outputFormat & OF_JSON) {
*output << "null";
+2 -2
View File
@@ -134,8 +134,8 @@ Device* Device::create(const char* name, unsigned int extraLatency, bool checkDe
free(in);
return new NetworkDevice(name, hostOrIp, port, extraLatency, readOnly, initialSend, udp, enhanced);
}
// support enh:/dev/<device>
return new SerialDevice(name, checkDevice, extraLatency, readOnly, initialSend, enhanced);
// support enh:/dev/<device>, ens:/dev/<device>, and /dev/<device>
return new SerialDevice(name, checkDevice, extraLatency, readOnly, initialSend, enhanced, highSpeed);
}
result_t Device::open() {
+1 -2
View File
@@ -25,7 +25,6 @@
#include <deque>
#include <map>
#include <queue>
#include <functional>
#include "lib/ebus/data.h"
#include "lib/ebus/result.h"
#include "lib/ebus/symbol.h"
@@ -800,7 +799,7 @@ class ChainedMessage : public Message {
/**
* A function that compares the weighted poll priority of two @a Message instances.
*/
struct compareMessagePriority : binary_function<Message*, Message*, bool> {
struct compareMessagePriority {
/**
* Compare the weighted poll priority of the two @a Message instances.
* @param x the first @a Message.