diff --git a/CMakeLists.txt b/CMakeLists.txt index bed5086f..e5fe6dd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # define the minimum cmake version (as required by cmake) cmake_minimum_required(VERSION 2.8) -set(CMAKE_TOOLCHAIN_FILE /opt/raspberrypi/Toolchain-RaspberryPi.cmake) +#set(CMAKE_TOOLCHAIN_FILE /opt/raspberrypi/Toolchain-RaspberryPi.cmake) # Define the main-project name project(Hyperion) diff --git a/src/hyperion-remote/CMakeLists.txt b/src/hyperion-remote/CMakeLists.txt index 277598e4..d4141b86 100644 --- a/src/hyperion-remote/CMakeLists.txt +++ b/src/hyperion-remote/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 2.8) + project(hyperion-remote) find_package(Qt4 REQUIRED QtCore QtGui QtNetwork) @@ -11,21 +12,17 @@ LINK_DIRECTORIES(${LINK_DIRECTORIES} ${CMAKE_FIND_ROOT_PATH}/lib/arm-linux-gnuea include_directories(${QT_INCLUDES}) set(hyperion-remote_HEADERS - specialoptions.h - connection.h - colortransform.h) + CustomParameter.h + Connection.h + ColorTransformValues.h) set(hyperion-remote_SOURCES hyperion-remote.cpp - connection.cpp) - -qt4_wrap_cpp(HYPERION_REMOTE_MOC_SOURCES - ${hyperion-remote_HEADERS}) + Connection.cpp) add_executable(hyperion-remote ${hyperion-remote_HEADERS} - ${hyperion-remote_SOURCES} - ${HYPERION_REMOTE_MOC_SOURCES}) + ${hyperion-remote_SOURCES}) qt4_use_modules(hyperion-remote Core diff --git a/src/hyperion-remote/colortransform.h b/src/hyperion-remote/ColorTransformValues.h similarity index 75% rename from src/hyperion-remote/colortransform.h rename to src/hyperion-remote/ColorTransformValues.h index 06fb87f7..1649b191 100644 --- a/src/hyperion-remote/colortransform.h +++ b/src/hyperion-remote/ColorTransformValues.h @@ -1,6 +1,6 @@ #pragma once -struct ColorTransform +struct ColorTransformValues { double valueRed; double valueGreen; diff --git a/src/hyperion-remote/connection.cpp b/src/hyperion-remote/Connection.cpp similarity index 93% rename from src/hyperion-remote/connection.cpp rename to src/hyperion-remote/Connection.cpp index 7e8e8b01..342585b5 100644 --- a/src/hyperion-remote/connection.cpp +++ b/src/hyperion-remote/Connection.cpp @@ -1,6 +1,6 @@ #include -#include "connection.h" +#include "Connection.h" Connection::Connection(const std::string & a, bool printJson) : _printJson(printJson), @@ -63,7 +63,7 @@ bool Connection::clearAll() return false; } -bool Connection::setTransform(ColorTransform *threshold, ColorTransform *gamma, ColorTransform *blacklevel, ColorTransform *whitelevel) +bool Connection::setTransform(ColorTransformValues *threshold, ColorTransformValues *gamma, ColorTransformValues *blacklevel, ColorTransformValues *whitelevel) { std::cout << "Set color transforms" << std::endl; return false; diff --git a/src/hyperion-remote/connection.h b/src/hyperion-remote/Connection.h similarity index 74% rename from src/hyperion-remote/connection.h rename to src/hyperion-remote/Connection.h index 959e060b..51ca7493 100644 --- a/src/hyperion-remote/connection.h +++ b/src/hyperion-remote/Connection.h @@ -8,7 +8,7 @@ #include -#include "colortransform.h" +#include "ColorTransformValues.h" class Connection { @@ -21,7 +21,7 @@ public: bool listPriorities(); bool clear(int priority); bool clearAll(); - bool setTransform(ColorTransform * threshold, ColorTransform * gamma, ColorTransform * blacklevel, ColorTransform * whitelevel); + bool setTransform(ColorTransformValues * threshold, ColorTransformValues * gamma, ColorTransformValues * blacklevel, ColorTransformValues * whitelevel); private: bool sendMessage(const Json::Value & message); diff --git a/src/hyperion-remote/specialoptions.h b/src/hyperion-remote/CustomParameter.h similarity index 91% rename from src/hyperion-remote/specialoptions.h rename to src/hyperion-remote/CustomParameter.h index 8949bde4..199f4c85 100644 --- a/src/hyperion-remote/specialoptions.h +++ b/src/hyperion-remote/CustomParameter.h @@ -5,11 +5,11 @@ #include -#include "colortransform.h" +#include "ColorTransformValues.h" typedef vlofgren::PODParameter ColorParameter; typedef vlofgren::PODParameter ImageParameter; -typedef vlofgren::PODParameter TransformParameter; +typedef vlofgren::PODParameter TransformParameter; namespace vlofgren { template<> @@ -67,9 +67,9 @@ namespace vlofgren { } template<> - ColorTransform TransformParameter::validate(const std::string& s) throw (Parameter::ParameterRejected) + ColorTransformValues TransformParameter::validate(const std::string& s) throw (Parameter::ParameterRejected) { - ColorTransform transform; + ColorTransformValues transform; // s should be split in 3 parts // seperators are either a ',' or a space diff --git a/src/hyperion-remote/hyperion-remote.cpp b/src/hyperion-remote/hyperion-remote.cpp index 9b5be248..6b60bac0 100644 --- a/src/hyperion-remote/hyperion-remote.cpp +++ b/src/hyperion-remote/hyperion-remote.cpp @@ -4,8 +4,8 @@ #include -#include "specialoptions.h" -#include "connection.h" +#include "CustomParameter.h" +#include "Connection.h" using namespace vlofgren; @@ -115,10 +115,10 @@ int main(int argc, char * argv[]) } else if (colorTransform) { - ColorTransform threshold = argThreshold.getValue(); - ColorTransform gamma = argGamma.getValue(); - ColorTransform blacklevel = argBlacklevel.getValue(); - ColorTransform whitelevel = argWhitelevel.getValue(); + ColorTransformValues threshold = argThreshold.getValue(); + ColorTransformValues gamma = argGamma.getValue(); + ColorTransformValues blacklevel = argBlacklevel.getValue(); + ColorTransformValues whitelevel = argWhitelevel.getValue(); connection.setTransform( argThreshold.isSet() ? &threshold : nullptr,