Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several random fixes + Experimental playground #917

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ If you used a `.deb` package please uninstall it before you upgrade
- Resolve enable state for v4l and screen capture (#728)
- Enable/Disable loops for components
- Runs now on x86_64 LibreElec (missing libs) (#736)
- Brightness componsation is now visible for configuration (#746)
- Brightness compensation is now visible for configuration (#746)
- Prevent malformed image size for effects with specific led layouts (#746)

### Changed:
Expand Down Expand Up @@ -170,7 +170,7 @@ If you used a `.deb` package please uninstall it before you upgrade
- Smoothing comp state on startup (#685)
- Azure GitHub release title (#686)
- SSL/Avahi problems in previous release (#689)
- WebUI Version Check to SemVer. Also addes "Alpha" Channel (#692)
- WebUI Version Check to SemVer. Also adds "Alpha" Channel (#692)

### Removed
- Travis CI tests (#684)
Expand Down
26 changes: 15 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,19 @@ else()
endif()

# Set build variables
SET ( DEFAULT_AMLOGIC OFF )
SET ( DEFAULT_DISPMANX OFF )
SET ( DEFAULT_OSX OFF )
SET ( DEFAULT_X11 OFF )
SET ( DEFAULT_QT ON )
SET ( DEFAULT_WS281XPWM OFF )
SET ( DEFAULT_AVAHI ON )
SET ( DEFAULT_USE_SHARED_AVAHI_LIBS ON )
SET ( DEFAULT_AMLOGIC OFF )
SET ( DEFAULT_DISPMANX OFF )
SET ( DEFAULT_OSX OFF )
SET ( DEFAULT_X11 OFF )
SET ( DEFAULT_QT ON )
SET ( DEFAULT_WS281XPWM OFF )
SET ( DEFAULT_AVAHI ON )
SET ( DEFAULT_USE_SHARED_AVAHI_LIBS ON )
SET ( DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS OFF )
SET ( DEFAULT_USE_SYSTEM_PROTO_LIBS OFF )
SET ( DEFAULT_USE_SYSTEM_MBEDTLS_LIBS OFF )
SET ( DEFAULT_TESTS OFF )
SET ( DEFAULT_USE_SYSTEM_PROTO_LIBS OFF )
SET ( DEFAULT_USE_SYSTEM_MBEDTLS_LIBS OFF )
SET ( DEFAULT_TESTS OFF )
SET ( DEFAULT_EXPERIMENTAL OFF )

IF ( ${CMAKE_SYSTEM} MATCHES "Linux" )
SET ( DEFAULT_V4L2 ON )
Expand Down Expand Up @@ -190,6 +191,9 @@ message(STATUS "ENABLE_TESTS = ${ENABLE_TESTS}")
option(ENABLE_PROFILER "enable profiler capabilities - not for release code" OFF)
message(STATUS "ENABLE_PROFILER = ${ENABLE_PROFILER}")

option(ENABLE_EXPERIMENTAL "Compile experimental features" ${DEFAULT_EXPERIMENTAL})
message(STATUS "ENABLE_EXPERIMENTAL = ${ENABLE_EXPERIMENTAL}")

SET ( FLATBUFFERS_INSTALL_BIN_DIR ${CMAKE_BINARY_DIR}/flatbuf )
SET ( FLATBUFFERS_INSTALL_LIB_DIR ${CMAKE_BINARY_DIR}/flatbuf )

Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ Error( log_main, "oh to crazy, aborting");
// quick logging, when only one message exists and want no typing overhead - or usage in static functions
Info( Logger::getInstance("LedDevice"), "Leddevice %s started", "PublicStreetLighting");

// a bit mor complex - with printf like format
// a bit more complex - with printf like format
Info( log_main, "hello %s, you have %d messages", "Dax", 25);

// conditional messages
WarningIf( (value>threshold), log_main, "Alert, your value is greater then %d", threshold );
```
The amount of "%" mus match with following arguments
The amount of "%" must match with following arguments

#### The Placeholders
- %s for strings (this are cstrings, when having std::string use myStdString.c_str() to convert)
Expand All @@ -110,7 +110,7 @@ The amount of "%" mus match with following arguments

#### Log Level
* Debug - used when message is more or less for the developer or for trouble shooting
* Info - used for not absolutly developer stuff messages for what's going on
* Info - used for not absolutely developer stuff messages for what's going on
* Warning - warn if something is not as it should be, but didn't harm
* Error - used when an error occurs

Expand All @@ -120,7 +120,7 @@ The amount of "%" mus match with following arguments
> TODO

## Visual Studio Code
**We assume that you sucessfully compiled Hyperion with the [Compile HowTo](CompileHowto.md) WITHOUT Docker** \
**We assume that you successfully compiled Hyperion with the [Compile HowTo](CompileHowto.md) WITHOUT Docker** \
If you want to use VSCode for development follow the steps.

- Install [VSCode](https://code.visualstudio.com/). On Ubuntu 16.04+ you can also use the [Snapcraft VSCode](https://snapcraft.io/code) package.
Expand Down
3 changes: 3 additions & 0 deletions HyperionConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
// Define to enable profiler for development purpose
#cmakedefine ENABLE_PROFILER

// Define to enable experimental features
#cmakedefine ENABLE_EXPERIMENTAL

// the hyperion build id string
#define HYPERION_BUILD_ID "${HYPERION_BUILD_ID}"
#define HYPERION_GIT_REMOTE "${HYPERION_GIT_REMOTE}"
Expand Down
38 changes: 30 additions & 8 deletions bin/compile.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,46 @@
#!/bin/sh

# exit on error
set -e

TARGET=${1:-hyperion}
CFG="${2:-Release}"
INST="$( [ "${3:-}" = "install" ] && echo true || echo false )"

sudo apt-get update
sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev libturbojpeg0-dev python3-dev libcec-dev libxcb-util0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libssl-dev libjpeg-dev libqt5sql5-sqlite zlib1g-dev || exit 1
sudo apt-get install \
git \
cmake \
build-essential \
qtbase5-dev \
libqt5serialport5-dev \
libusb-1.0-0-dev \
libturbojpeg0-dev \
python3-dev \
libcec-dev \
libxcb-util0-dev \
libxcb-randr0-dev \
libxrandr-dev \
libxrender-dev \
libavahi-core-dev \
libavahi-compat-libdnssd-dev \
libssl-dev \
libjpeg-dev \
libqt5sql5-sqlite \
zlib1g-dev \

if [ -e /dev/vc-cma -a -e /dev/vc-mem ]
then
sudo apt-get install libraspberrypi-dev || exit 1
sudo apt-get install libraspberrypi-dev
fi

git clone --recursive https://github.com/hyperion-project/hyperion.ng.git ${TARGET} || exit 1
git clone --recursive https://github.com/hyperion-project/hyperion.ng.git ${TARGET}

rm -rf $TARGET/build
mkdir -p $TARGET/build || exit 1
cd $TARGET/build || exit 1
cmake -DCMAKE_BUILD_TYPE=$CFG .. || exit 1
make -j $(nproc) || exit 1
rm -rf $TARGET/build
mkdir -p $TARGET/build
cd $TARGET/build
cmake -DCMAKE_BUILD_TYPE=$CFG ..
make -j $(nproc)

# optional: install into your system
$INST && sudo make install/strip
Expand Down
10 changes: 5 additions & 5 deletions bin/remove_hyperion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ if [ $OS_OPENELEC -eq 1 ]; then
echo '---> Remove the OpenELEC Hyperion binaries and hyperion.config.json'
rm -rv /storage/hyperion 2>/dev/null
rm -v /storage/.config/hyperion.config.json 2>/dev/null
else
else
#Remove binaries on all distributions/systems (not OpenELEC)
echo "---> Remove links to the binaries"
echo "---> Remove links to the binaries"
rm -v /usr/bin/hyperiond 2>/dev/null
rm -v /usr/bin/hyperion-remote 2>/dev/null
rm -v /usr/bin/hyperion-v4l2 2>/dev/null
Expand All @@ -112,8 +112,8 @@ else
rm -rv /etc/hyperion 2>/dev/null
rm -rv /usr/share/hyperion 2>/dev/null
fi
echo '*******************************************************************************'
echo '*******************************************************************************'
echo 'Hyperion successful removed!'
echo '*******************************************************************************'
echo '*******************************************************************************'
exit 0

2 changes: 1 addition & 1 deletion cmake/FindCoreFoundation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set(CoreFoundation_FOUND false)
set(CoreFoundation_INCLUDE_DIR)
set(CoreFoundation_LIBRARY)

if(APPLE)
if(APPLE)
# The only platform it makes sense to check for CoreFoundation
find_library(CoreFoundation CoreFoundation)
if(CoreFoundation)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindIOKit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set(IOKit_FOUND false)
set(IOKit_INCLUDE_DIR)
set(IOKit_LIBRARY)

if(APPLE)
if(APPLE)
# The only platform it makes sense to check for IOKit
find_library(IOKit IOKit)
if(IOKit)
Expand Down
14 changes: 7 additions & 7 deletions cmake/Toolchain-imx6.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)

SET(CROSSROOT $ENV{HOME}/crosscompile)
SET(DEVROOT ${CROSSROOT}/hummingboard)
Expand All @@ -8,20 +8,20 @@ SET(CUBIXCROSS_DIR ${DEVROOT}/tools)

SET(TOOLROOT ${CUBIXCROSS_DIR}/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/ )

# specify the cross compiler
# specify the cross compiler
SET(CMAKE_C_COMPILER ${TOOLROOT}/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER ${TOOLROOT}/bin/arm-linux-gnueabihf-g++)
SET(CUBIX_FLAGS "-march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard")
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "armhf" )
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "armhf" )

SET(CMAKE_SYSROOT ${CUBIXROOT})
SET(CMAKE_FIND_ROOT_PATH ${CUBIXROOT})

# search for programs in the build host directories
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
#SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGES ONLY)

Expand Down
14 changes: 7 additions & 7 deletions cmake/Toolchain-rpi.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)

SET(CROSSROOT $ENV{HOME}/crosscompile)
SET(DEVROOT ${CROSSROOT}/raspberrypi)
Expand All @@ -9,19 +9,19 @@ SET(PITOOLCHAIN ${DEVROOT}/tools)
SET(TOOLROOT ${PITOOLCHAIN}/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf )
SET(QT_BIN_PATH ${CROSSROOT}/Qt5/5.7/gcc_64/bin)

# specify the cross compiler
# specify the cross compiler
SET(CMAKE_C_COMPILER ${TOOLROOT}/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER ${TOOLROOT}/bin/arm-linux-gnueabihf-g++)
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "armhf" )
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "armhf" )

SET(CMAKE_SYSROOT ${PIROOT})
SET(CMAKE_FIND_ROOT_PATH ${PIROOT})

# search for programs in the build host directories
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
#SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGES ONLY)

Expand Down
40 changes: 20 additions & 20 deletions config/hyperion.config.json.commented
Original file line number Diff line number Diff line change
Expand Up @@ -109,36 +109,36 @@
/// * cropRight : Cropping from the right [default=0]
/// * cropTop : Cropping from the top [default=0]
/// * cropBottom : Cropping from the bottom [default=0]
/// * signalDetection : enable/disable signal detection [default=true]
/// * cecDetection : enable/disable cec detection [default=true]
/// * signalDetection : enable/disable signal detection [default=false]
/// * cecDetection : enable/disable cec detection [default=false]
/// * redSignalThreshold : Signal threshold for the red channel between 0 and 100 [default=5]
/// * greenSignalThreshold : Signal threshold for the green channel between 0 and 100 [default=5]
/// * blueSignalThreshold : Signal threshold for the blue channel between 0 and 100 [default=5]
/// * sDHOffsetMin : area for signal detection - horizontal minimum offset value. Values between 0.0 and 1.0
/// * sDVOffsetMin : area for signal detection - vertical minimum offset value. Values between 0.0 and 1.0
/// * sDHOffsetMax : area for signal detection - horizontal maximum offset value. Values between 0.0 and 1.0
/// * sDVOffsetMax : area for signal detection - vertical maximum offset value. Values between 0.0 and 1.0
/// * sDHOffsetMin : area for signal detection - horizontal minimum offset value. Values between 0.0 and 1.0
/// * sDVOffsetMin : area for signal detection - vertical minimum offset value. Values between 0.0 and 1.0
/// * sDHOffsetMax : area for signal detection - horizontal maximum offset value. Values between 0.0 and 1.0
/// * sDVOffsetMax : area for signal detection - vertical maximum offset value. Values between 0.0 and 1.0
"grabberV4L2" :
{
"device" : "auto",
"width" : 0,
"height" : 0,
"standard" : "NO_CHANGE",
"sizeDecimation" : 8,
"priority" : 240,
"cropLeft" : 0,
"cropRight" : 0,
"cropTop" : 0,
"cropBottom" : 0,
"device" : "auto",
"width" : 0,
"height" : 0,
"standard" : "NO_CHANGE",
"sizeDecimation" : 8,
"priority" : 240,
"cropLeft" : 0,
"cropRight" : 0,
"cropTop" : 0,
"cropBottom" : 0,
"redSignalThreshold" : 5,
"greenSignalThreshold" : 5,
"blueSignalThreshold" : 5,
"signalDetection" : false,
"cecDetection" : false,
"sDVOffsetMin" : 0.25,
"sDHOffsetMin" : 0.25,
"sDVOffsetMax" : 0.75,
"sDHOffsetMax" : 0.75
"sDVOffsetMin" : 0.25,
"sDHOffsetMin" : 0.25,
"sDVOffsetMax" : 0.75,
"sDHOffsetMax" : 0.75
},

/// The configuration for the frame-grabber, contains the following items:
Expand Down
60 changes: 30 additions & 30 deletions config/hyperion.config.json.default
Original file line number Diff line number Diff line change
Expand Up @@ -58,40 +58,40 @@

"grabberV4L2" :
{
"device" : "auto",
"input" : 0,
"width" : 0,
"height" : 0,
"fps" : 15,
"standard" : "NO_CHANGE",
"sizeDecimation" : 8,
"cropLeft" : 0,
"cropRight" : 0,
"cropTop" : 0,
"cropBottom" : 0,
"redSignalThreshold" : 5,
"greenSignalThreshold" : 5,
"blueSignalThreshold" : 5,
"signalDetection" : false,
"cecDetection" : false,
"sDVOffsetMin" : 0.25,
"sDHOffsetMin" : 0.25,
"sDVOffsetMax" : 0.75,
"sDHOffsetMax" : 0.75
"device" : "auto",
"input" : 0,
"width" : 0,
"height" : 0,
"fps" : 15,
"standard" : "NO_CHANGE",
"sizeDecimation" : 8,
"cropLeft" : 0,
"cropRight" : 0,
"cropTop" : 0,
"cropBottom" : 0,
"redSignalThreshold" : 5,
"greenSignalThreshold" : 5,
"blueSignalThreshold" : 5,
"signalDetection" : false,
"cecDetection" : false,
"sDVOffsetMin" : 0.25,
"sDHOffsetMin" : 0.25,
"sDVOffsetMax" : 0.75,
"sDHOffsetMax" : 0.75
},

"framegrabber" :
{
"type" : "auto",
"width" : 80,
"height" : 45,
"frequency_Hz" : 10,
"pixelDecimation" : 8,
"cropLeft" : 0,
"cropRight" : 0,
"cropTop" : 0,
"cropBottom" : 0,
"device" : "/dev/fb0"
"type" : "auto",
"width" : 80,
"height" : 45,
"frequency_Hz" : 10,
"pixelDecimation" : 8,
"cropLeft" : 0,
"cropRight" : 0,
"cropTop" : 0,
"cropBottom" : 0,
"device" : "/dev/fb0"
},

"blackborderdetector" :
Expand Down
Loading