mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Tests are running again
Revised Readme.md Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
parent
d40aa71aa9
commit
ff93dd3b25
@ -45,7 +45,7 @@ jobs:
|
||||
|
||||
# build process
|
||||
- bash: ./.ci/ci_build.sh
|
||||
displayName: 'Build $(dockerName)'
|
||||
displayName: 'Build $(dockerName) packages'
|
||||
env:
|
||||
DOCKER_TAG: $(dockerTag)
|
||||
DOCKER_NAME: $(dockerName)
|
||||
@ -113,7 +113,9 @@ jobs:
|
||||
|
||||
# build process
|
||||
- bash: ./.ci/ci_build.sh
|
||||
displayName: 'Build macOS 10.13'
|
||||
displayName: 'Build macOS 10.13 packages'
|
||||
env:
|
||||
PLATFORM: 'osx'
|
||||
|
||||
# copy files
|
||||
- bash: 'cp -v build/Hyperion.NG-* $(Build.ArtifactStagingDirectory)'
|
||||
|
@ -17,25 +17,23 @@ fi
|
||||
# set environment variables if not exists
|
||||
[ -z "${BUILD_TYPE}" ] && BUILD_TYPE="Debug"
|
||||
|
||||
# Determine cmake build type; tag builds are Release, else Debug
|
||||
# Determine cmake build type; tag builds are Release, else Debug (-dev appends to platform)
|
||||
if [[ $BUILD_SOURCEBRANCH == *"refs/tags"* ]]; then
|
||||
BUILD_TYPE=Release
|
||||
else
|
||||
PLATFORM=${PLATFORM}-dev
|
||||
fi
|
||||
|
||||
# Determie -dev appends to platform;
|
||||
# Commented because tests are currently broken
|
||||
# [ "${TRAVIS_EVENT_TYPE:-}" != 'cron' -a -z "${TRAVIS_TAG:-}" ] && PLATFORM=${PLATFORM}-dev
|
||||
|
||||
# Build the package on osx or linux
|
||||
if [[ "$CI_NAME" == 'osx' || "$CI_NAME" == 'darwin' ]]; then
|
||||
# compile prepare
|
||||
mkdir build || exit 1
|
||||
mkdir ${CI_BUILD_DIR}/deploy || exit 1
|
||||
cd build
|
||||
cmake -DPLATFORM="osx" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ../ || exit 2
|
||||
cmake -DPLATFORM=${PLATFORM} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ../ || exit 2
|
||||
make -j $(sysctl -n hw.ncpu) package || exit 3
|
||||
cd ${CI_BUILD_DIR} && source /${CI_BUILD_DIR}/test/testrunner.sh || exit 4
|
||||
exit 0;
|
||||
exit 1 || { echo "---> Hyperion compilation failed! Abort"; exit 4; }
|
||||
exit 1 || { echo "---> Hyperion compilation failed! Abort"; exit 5; }
|
||||
elif [[ "$CI_NAME" == 'linux' ]]; then
|
||||
echo "Compile Hyperion with DOCKER_TAG = ${DOCKER_TAG} and friendly name DOCKER_NAME = ${DOCKER_NAME}"
|
||||
# take ownership of deploy dir
|
||||
@ -52,8 +50,9 @@ elif [[ "$CI_NAME" == 'linux' ]]; then
|
||||
make -j $(nproc) package || exit 3 &&
|
||||
cp /hyperion.ng/build/bin/h* /deploy/ 2>/dev/null || : &&
|
||||
cp /hyperion.ng/build/Hyperion.NG-* /deploy/ 2>/dev/null || : &&
|
||||
cd /hyperion.ng && source /hyperion.ng/test/testrunner.sh || exit 4 &&
|
||||
exit 0;
|
||||
exit 1 " || { echo "---> Hyperion compilation failed! Abort"; exit 4; }
|
||||
exit 1 " || { echo "---> Hyperion compilation failed! Abort"; exit 5; }
|
||||
|
||||
# overwrite file owner to current user
|
||||
sudo chown -fR $(stat -c "%U:%G" ${CI_BUILD_DIR}/deploy) ${CI_BUILD_DIR}/deploy
|
||||
|
@ -24,11 +24,13 @@ jobs:
|
||||
env:
|
||||
- DOCKER_TAG=amd64
|
||||
- DOCKER_NAME="Debian Stretch (AMD64)"
|
||||
- PLATFORM="x11"
|
||||
- <<: *linux
|
||||
name: "i386 (x86)"
|
||||
env:
|
||||
- DOCKER_TAG=i386
|
||||
- DOCKER_NAME="Debian Stretch (i386)"
|
||||
- PLATFORM="x11"
|
||||
# ////////////////////////////////////////////////////////////////
|
||||
# NOTE: Temporary disabled because travis timeouts
|
||||
# ////////////////////////////////////////////////////////////////
|
||||
@ -57,6 +59,7 @@ jobs:
|
||||
name: "macOS 10.12 (Xcode 8.3.3)"
|
||||
env:
|
||||
- HOMEBREW_CACHE=$HOME/brew-cache
|
||||
- PLATFORM="osx"
|
||||
|
||||
script:
|
||||
- ./.ci/ci_build.sh
|
||||
|
@ -80,14 +80,6 @@ ELSE()
|
||||
SET ( DEFAULT_USB_HID OFF )
|
||||
ENDIF()
|
||||
|
||||
if (APPLE)
|
||||
SET( PLATFORM "osx")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
SET( PLATFORM "windows")
|
||||
endif()
|
||||
|
||||
if ( NOT DEFINED PLATFORM )
|
||||
if ( "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86" )
|
||||
SET( PLATFORM "x11")
|
||||
@ -100,6 +92,10 @@ if ( NOT DEFINED PLATFORM )
|
||||
elseif ( ("${SYSTEM_CPUINFO}" MATCHES "amlogic" OR "${SYSTEM_CPUINFO}" MATCHES "odroid-c2" OR "${SYSTEM_CPUINFO}" MATCHES "vero4k") AND ${CMAKE_SIZEOF_VOID_P} EQUAL 8 )
|
||||
SET( PLATFORM "amlogic64" )
|
||||
endif()
|
||||
elseif ( APPLE )
|
||||
SET( PLATFORM "osx")
|
||||
elseif ( WIN32 )
|
||||
SET( PLATFORM "windows")
|
||||
endif()
|
||||
if ( PLATFORM )
|
||||
message( STATUS "PLATFORM is not defined, evaluated platform: ${PLATFORM}")
|
||||
|
75
README.md
75
README.md
@ -1,68 +1,47 @@
|
||||
<p align="center">
|
||||
<img src="./assets/webconfig/img/hyperion/hyperionlogo.png" height="130">
|
||||
</p>
|
||||
![Hyperion.NG](https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/assets/webconfig/img/hyperion/hyperionlogo.png)
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.hyperion-project.org" alt="Forum">
|
||||
<img src="https://img.shields.io/website/https/hyperion-project.org.svg?down_color=red&down_message=offline&up_color=green&up_message=online" /></a>
|
||||
<a href="https://github.com/hyperion-project/hyperion.ng/graphs/contributors" alt="Contributors">
|
||||
<img src="https://img.shields.io/github/contributors/hyperion-project/hyperion.ng.svg" /></a>
|
||||
<a href="https://github.com/hyperion-project/hyperion.ng/tree/master/dependencies/external" alt="Dependencies">
|
||||
<img src="https://img.shields.io/librariesio/github/hyperion-project/hyperion.ng.svg" /></a>
|
||||
<a href="https://dev.azure.com/Hyperion-Project/Hyperion.NG/_build/latest?definitionId=7&branchName=master" alt="Azure-Pipeline">
|
||||
<img src="https://dev.azure.com/Hyperion-Project/Hyperion.NG/_apis/build/status/Hyperion.NG?branchName=master" /></a>
|
||||
<a href="https://travis-ci.org/hyperion-project/hyperion.ng" alt="Travis-CI">
|
||||
<img src="https://travis-ci.org/hyperion-project/hyperion.ng.svg?branch=master" /></a>
|
||||
<a href="https://lgtm.com/projects/g/hyperion-project/hyperion.ng/alerts/">
|
||||
<img src="https://img.shields.io/lgtm/alerts/g/hyperion-project/hyperion.ng.svg"
|
||||
alt="Total alerts"/></a>
|
||||
<a href="https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/LICENSE">
|
||||
<img src="https://img.shields.io/badge/License-MIT-yellow.svg"
|
||||
alt="GitHub license"></a>
|
||||
<a href="https://poeditor.com/join/project/Y4F6vHRFjA">
|
||||
<img src="https://img.shields.io/badge/POEditor-translate-green.svg"
|
||||
alt="Join Translation"></a>
|
||||
</p>
|
||||
[![Dependencies](https://img.shields.io/librariesio/github/hyperion-project/hyperion.ng.svg)](https://github.com/hyperion-project/hyperion.ng/tree/master/dependencies/external)
|
||||
[![Azure-Pipeline](https://dev.azure.com/Hyperion-Project/Hyperion.NG/_apis/build/status/Hyperion.NG?branchName=master)](https://dev.azure.com/Hyperion-Project/Hyperion.NG/_build/latest?definitionId=7&branchName=master)
|
||||
[![Travis-CI](https://travis-ci.org/hyperion-project/hyperion.ng.svg?branch=master)](https://travis-ci.org/hyperion-project/hyperion.ng)
|
||||
[![LGTM](https://img.shields.io/lgtm/alerts/g/hyperion-project/hyperion.ng.svg)](https://lgtm.com/projects/g/hyperion-project/hyperion.ng/alerts/)
|
||||
|
||||
<p align="center">This is a pre alpha development repository for the next major version of hyperion</p>
|
||||
## About Hyperion
|
||||
|
||||
--------
|
||||
## **Important notice!**
|
||||
[Hyperion.NG](https://github.com/hyperion-project/hyperion.ng) is an opensource '[AmbiLight](https://de.wikipedia.org/wiki/Ambilight)' implementation with support for many LED devices and video grabbers. The project is still in a beta development stage (no stable release available).
|
||||
|
||||
Hyperion.NG is under heavy development. This version is currently _only for development_ purpose.
|
||||
Please do not use it for your 'productiv' setup!
|
||||
![Screenshot](doc/screenshot.png)
|
||||
|
||||
If you want to use hyperion as 'normal user', please use [current stable version](https://github.com/hyperion-project/hyperion)
|
||||
### Features:
|
||||
|
||||
Besides of that .... Feel free to join us! We are looking always for people who wants to participate.
|
||||
|
||||
--------
|
||||
## About
|
||||
|
||||
Hyperion is an opensource 'AmbiLight' implementation with support for many LED devices and video grabbers.
|
||||
|
||||
The main features of Hyperion are:
|
||||
* Low CPU load makes it perfect for SoCs like Raspberry Pi
|
||||
* Json interface which allows easy integration into scripts
|
||||
* A command line utility to for testing and integration in automated environment
|
||||
* Priority channels are not coupled to a specific led data provider which means that a provider can post led data and leave without the need to maintain a connection to Hyperion. This is ideal for a remote application (like our Android app).
|
||||
* Black border detector.
|
||||
* Priority channels are not coupled to a specific led data provider which means that a provider can post led data and leave without the need to maintain a connection to Hyperion. This is ideal for a remote application (like our [Android app](https://play.google.com/store/apps/details?id=nl.hyperion.hyperionpro)).
|
||||
* Black border detector and processor
|
||||
* A scriptable (Python) effect engine
|
||||
* A web ui to configure and remote control hyperion
|
||||
* A multi language web interface to configure and remote control hyperion
|
||||
|
||||
More information can be found on the official Hyperion [Wiki](https://wiki.hyperion-project.org)
|
||||
If you need further support please open a topic at the forum!
|
||||
[![Hyperion webpage/forum](https://img.shields.io/website/https/hyperion-project.org.svg?down_color=red&down_message=offline&up_color=green&up_message=online)](https://www.hyperion-project.org)
|
||||
|
||||
If you need further support please open a topic at the our new forum!
|
||||
[Hyperion webpage/forum](https://www.hyperion-project.org).
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome! Feel free to join us! We are looking always for people who wants to participate.
|
||||
[![Contributors](https://img.shields.io/github/contributors/hyperion-project/hyperion.ng.svg)](https://github.com/hyperion-project/hyperion.ng/graphs/contributors)
|
||||
|
||||
For an example, you can participate in the translation.
|
||||
[![Join Translation](https://img.shields.io/badge/POEditor-translate-green.svg)](https://poeditor.com/join/project/Y4F6vHRFjA)
|
||||
|
||||
## Requirements
|
||||
* Debian 9, Ubuntu 16.04 or higher. Windows is not supported currently.
|
||||
Debian 9, Ubuntu 16.04 or higher. Windows is not supported currently.
|
||||
|
||||
## Building
|
||||
See [Compilehowto](CompileHowto.md) and [CrossCompileHowto](CrossCompileHowto.txt).
|
||||
See [CompileHowto](CompileHowto.md) and [CrossCompileHowto](CrossCompileHowto.txt).
|
||||
|
||||
## Download
|
||||
A download isn't available, you need to compile your own version see "Building"
|
||||
**Please be patient. The first release is coming soon.**
|
||||
|
||||
## License
|
||||
The source is released under MIT-License (see http://opensource.org/licenses/MIT).
|
||||
The source is released under MIT-License (see http://opensource.org/licenses/MIT).
|
||||
[![GitHub license](https://img.shields.io/badge/License-MIT-yellow.svg)](https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/LICENSE)
|
||||
|
||||
|
BIN
doc/screenshot.png
Normal file
BIN
doc/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 226 KiB |
@ -117,25 +117,25 @@ private:
|
||||
void updateBrightnessComponents();
|
||||
|
||||
/// backlight variables
|
||||
bool _backLightEnabled;
|
||||
bool _backlightColored;
|
||||
double _backlightThreshold;
|
||||
double _sumBrightnessLow;
|
||||
bool _backLightEnabled
|
||||
, _backlightColored;
|
||||
double _backlightThreshold
|
||||
, _sumBrightnessLow;
|
||||
|
||||
/// gamma variables
|
||||
double _gammaR;
|
||||
double _gammaG;
|
||||
double _gammaB;
|
||||
double _gammaR
|
||||
, _gammaG
|
||||
, _gammaB;
|
||||
|
||||
/// The mapping from input color to output color
|
||||
uint8_t _mappingR[256];
|
||||
uint8_t _mappingG[256];
|
||||
uint8_t _mappingB[256];
|
||||
uint8_t _mappingR[256]
|
||||
, _mappingG[256]
|
||||
, _mappingB[256];
|
||||
|
||||
/// brightness variables
|
||||
uint8_t _brightness;
|
||||
uint8_t _brightnessCompensation;
|
||||
uint8_t _brightness_rgb;
|
||||
uint8_t _brightness_cmy;
|
||||
uint8_t _brightness_w;
|
||||
uint8_t _brightness
|
||||
, _brightnessCompensation
|
||||
, _brightness_rgb
|
||||
, _brightness_cmy
|
||||
, _brightness_w;
|
||||
};
|
||||
|
@ -13,9 +13,11 @@ CaptureCont::CaptureCont(Hyperion* hyperion)
|
||||
: QObject()
|
||||
, _hyperion(hyperion)
|
||||
, _systemCaptEnabled(false)
|
||||
, _systemCaptPrio(0)
|
||||
, _systemCaptName()
|
||||
, _systemInactiveTimer(new QTimer(this))
|
||||
, _v4lCaptEnabled(false)
|
||||
, _v4lCaptPrio(0)
|
||||
, _v4lCaptName()
|
||||
, _v4lInactiveTimer(new QTimer(this))
|
||||
{
|
||||
|
@ -106,7 +106,7 @@ void MultiColorAdjustment::applyAdjustment(std::vector<ColorRgb>& ledColors)
|
||||
uint8_t ored = color.red;
|
||||
uint8_t ogreen = color.green;
|
||||
uint8_t oblue = color.blue;
|
||||
uint8_t B_RGB, B_CMY, B_W;
|
||||
uint8_t B_RGB = 0, B_CMY = 0, B_W = 0;
|
||||
|
||||
adjustment->_rgbTransform.transform(ored,ogreen,oblue);
|
||||
adjustment->_rgbTransform.getBrightnessComponents(B_RGB, B_CMY, B_W);
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Needed for testing non-public components
|
||||
# Needed for testing non-public components
|
||||
include_directories(../libsrc)
|
||||
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
@ -10,7 +10,7 @@ ENDMACRO()
|
||||
if(ENABLE_SPIDEV)
|
||||
# Add the simple test executable 'TestSpi'
|
||||
add_executable(test_spi TestSpi.cpp)
|
||||
link_to_hyperion(test_spi)
|
||||
target_link_libraries( test_spi leddevice hyperion-utils hyperion )
|
||||
add_executable(spidev_test spidev_test.c)
|
||||
add_executable(gpio2spi switchPinCtrl.c)
|
||||
endif(ENABLE_SPIDEV)
|
||||
@ -21,19 +21,9 @@ link_to_hyperion(test_configfile)
|
||||
add_executable(test_ImageRgb TestRgbImage.cpp)
|
||||
link_to_hyperion(test_ImageRgb)
|
||||
|
||||
add_executable(test_image2ledsmap TestImage2LedsMap.cpp)
|
||||
link_to_hyperion(test_image2ledsmap)
|
||||
|
||||
if (ENABLE_DISPMANX)
|
||||
add_subdirectory(dispmanx2png)
|
||||
endif (ENABLE_DISPMANX)
|
||||
|
||||
add_executable(test_blackborderdetector TestBlackBorderDetector.cpp)
|
||||
link_to_hyperion(test_blackborderdetector)
|
||||
|
||||
add_executable(test_blackborderprocessor TestBlackBorderProcessor.cpp)
|
||||
link_to_hyperion(test_blackborderprocessor)
|
||||
|
||||
add_executable(test_qregexp TestQRegExp.cpp)
|
||||
target_link_libraries(test_qregexp Qt5::Widgets)
|
||||
|
||||
@ -45,3 +35,17 @@ if(ENABLE_X11)
|
||||
add_executable(test_x11performance TestX11Performance.cpp)
|
||||
target_link_libraries(test_x11performance ${X11_LIBRARIES} Qt5::Widgets)
|
||||
endif(ENABLE_X11)
|
||||
|
||||
######### These tests are broken. May they fix someone ##########
|
||||
|
||||
# add_executable(test_image2ledsmap TestImage2LedsMap.cpp)
|
||||
# link_to_hyperion(test_image2ledsmap)
|
||||
|
||||
# if (ENABLE_DISPMANX)
|
||||
# add_subdirectory(dispmanx2png)
|
||||
# endif (ENABLE_DISPMANX)
|
||||
|
||||
# add_executable(test_blackborderprocessor TestBlackBorderProcessor.cpp)
|
||||
# link_to_hyperion(test_blackborderprocessor)
|
||||
|
||||
###################################################
|
||||
|
@ -53,6 +53,7 @@ int TC_NO_BORDER()
|
||||
std::cerr << "Failed to correctly detect no border" << std::endl;
|
||||
result = -1;
|
||||
}
|
||||
else std::cout << "Correctly detected no border" << std::endl;
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -67,11 +68,12 @@ int TC_TOP_BORDER()
|
||||
{
|
||||
Image<ColorRgb> image = createImage(64, 64, 12, 0);
|
||||
BlackBorder border = detector.process(image);
|
||||
if (border.unknown != false && border.horizontalSize != 12 && border.verticalSize != 0)
|
||||
if (border.unknown != false && border.horizontalSize == 12 && border.verticalSize != 0)
|
||||
{
|
||||
std::cerr << "Failed to correctly detect horizontal border with correct size" << std::endl;
|
||||
result = -1;
|
||||
}
|
||||
else std::cout << "Correctly detected horizontal border with correct size" << std::endl;
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -86,11 +88,12 @@ int TC_LEFT_BORDER()
|
||||
{
|
||||
Image<ColorRgb> image = createImage(64, 64, 0, 12);
|
||||
BlackBorder border = detector.process(image);
|
||||
if (border.unknown != false && border.horizontalSize != 0 && border.verticalSize != 12)
|
||||
if (border.unknown != false && border.horizontalSize != 0 && border.verticalSize == 12)
|
||||
{
|
||||
std::cerr << "Failed to detected vertical border with correct size" << std::endl;
|
||||
std::cerr << "Failed to correctly detect vertical border with correct size" << std::endl;
|
||||
result = -1;
|
||||
}
|
||||
else std::cout << "Correctly detected vertical border with correct size" << std::endl;
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -105,11 +108,12 @@ int TC_DUAL_BORDER()
|
||||
{
|
||||
Image<ColorRgb> image = createImage(64, 64, 12, 12);
|
||||
BlackBorder border = detector.process(image);
|
||||
if (border.unknown != false && border.horizontalSize != 12 && border.verticalSize != 12)
|
||||
if (border.unknown != false && border.horizontalSize == 12 && border.verticalSize == 12)
|
||||
{
|
||||
std::cerr << "Failed to detected two-sided border" << std::endl;
|
||||
std::cerr << "Failed to correctly detect two-sided border" << std::endl;
|
||||
result = -1;
|
||||
}
|
||||
else std::cout << "Correctly detected two-sided border" << std::endl;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -125,9 +129,10 @@ int TC_UNKNOWN_BORDER()
|
||||
BlackBorder border = detector.process(image);
|
||||
if (border.unknown != true)
|
||||
{
|
||||
std::cerr << "Failed to detected unknown border" << std::endl;
|
||||
std::cerr << "Failed to correctly detect unknown border" << std::endl;
|
||||
result = -1;
|
||||
}
|
||||
else std::cout << "Correctly detected unknown border" << std::endl;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ bool loadConfig(const QString & configFile, bool correct, bool ignore)
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
QJsonObject schemaJson;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
schemaJson = QJsonFactory::readSchema(":/hyperion-schema");
|
||||
@ -28,14 +28,14 @@ bool loadConfig(const QString & configFile, bool correct, bool ignore)
|
||||
{
|
||||
throw std::runtime_error(error.what());
|
||||
}
|
||||
|
||||
|
||||
QJsonSchemaChecker schemaChecker;
|
||||
schemaChecker.setSchema(schemaJson);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// read and validate the configuration file from the command line
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
QJsonObject jsonConfig = QJsonFactory::readConfig(configFile);
|
||||
|
||||
if (!correct)
|
||||
@ -47,7 +47,7 @@ bool loadConfig(const QString & configFile, bool correct, bool ignore)
|
||||
{
|
||||
qDebug() << "config write validation: " << schemaError;
|
||||
}
|
||||
|
||||
|
||||
qDebug() << "FAILED";
|
||||
exit(1);
|
||||
return false;
|
||||
@ -82,7 +82,8 @@ int main(int argc, char** argv)
|
||||
QString option = argv[1];
|
||||
QString configFile;
|
||||
|
||||
if (option == "--ac" || option == "--ac-ignore-required")
|
||||
if (option == "--ac" || option == "--ac-ignore-required")
|
||||
{
|
||||
if (argc > 2)
|
||||
configFile = argv[2];
|
||||
else
|
||||
@ -90,8 +91,8 @@ int main(int argc, char** argv)
|
||||
usage();
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
configFile = argv[1];
|
||||
}
|
||||
else configFile = argv[1];
|
||||
|
||||
qDebug() << "Configuration file selected: " << configFile;
|
||||
qDebug() << "Attemp to load...";
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <QPixmap>
|
||||
#include <QFile>
|
||||
#include <QRgb>
|
||||
#include <QScreen>
|
||||
|
||||
#include <QElapsedTimer>
|
||||
|
||||
@ -21,7 +22,8 @@ void createScreenshot(const int cropHorizontal, const int cropVertical, const in
|
||||
const QRect screenSize = QApplication::desktop()->screenGeometry();
|
||||
const int croppedWidth = screenSize.width() - 2*cropVertical;
|
||||
const int croppedHeight = screenSize.height() - 2*cropHorizontal;
|
||||
const QPixmap fullSizeScreenshot = QPixmap::grabWindow(QApplication::desktop()->winId(), cropVertical, cropHorizontal, croppedWidth, croppedHeight);
|
||||
QScreen *screen = QApplication::primaryScreen();
|
||||
const QPixmap fullSizeScreenshot = screen->grabWindow(QApplication::desktop()->winId(), cropVertical, cropHorizontal, croppedWidth, croppedHeight);
|
||||
|
||||
// Scale the screenshot to the required size
|
||||
const int width = fullSizeScreenshot.width()/decimation;
|
||||
|
@ -3,6 +3,9 @@ IF ( "${PLATFORM}" MATCHES rpi)
|
||||
# Find the BCM-package (VC control)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
|
||||
find_package(BCM REQUIRED)
|
||||
include_directories(${BCM_INCLUDE_DIRS})
|
||||
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
link_directories(${CMAKE_FIND_ROOT_PATH}/lib/arm-linux-gnueabihf)
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
[ "${BUILD_TYPE}" == "Release" ] && exit 0
|
||||
|
||||
STATS_FAILED=0
|
||||
STATS_SUCCESS=0
|
||||
STATS_SKIPPED=0
|
||||
STATS_TOTAL=0
|
||||
|
||||
|
||||
# exec_test "test name" test_exec --with --args
|
||||
function exec_test()
|
||||
{
|
||||
@ -33,7 +34,9 @@ function exec_test()
|
||||
}
|
||||
|
||||
######################################
|
||||
## EXEC TESTS
|
||||
############# EXEC TESTS #############
|
||||
######################################
|
||||
|
||||
cd build || exit 1
|
||||
|
||||
echo
|
||||
@ -41,7 +44,7 @@ echo "Hyperion test execution"
|
||||
echo
|
||||
exec_test "hyperiond is executable and show version" bin/hyperiond --version
|
||||
|
||||
for cfg in ../config/*json*
|
||||
for cfg in ../config/*json.default
|
||||
do
|
||||
exec_test "test $(basename $cfg)" bin/test_configfile $cfg
|
||||
done
|
||||
@ -50,10 +53,10 @@ echo
|
||||
echo
|
||||
echo "TEST SUMMARY"
|
||||
echo "============"
|
||||
echo " total: $STATS_TOTAL"
|
||||
echo " success: $STATS_SUCCESS"
|
||||
echo " skipped: $STATS_SKIPPED"
|
||||
echo " failed: $STATS_FAILED"
|
||||
echo " total: $STATS_TOTAL"
|
||||
echo "success: $STATS_SUCCESS"
|
||||
echo "skipped: $STATS_SKIPPED"
|
||||
echo " failed: $STATS_FAILED"
|
||||
|
||||
sleep 2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user