Removed bootsequence library

Former-commit-id: 5f3f927236a26ae00299a8e7a914e98ace3b328a
This commit is contained in:
T. van der Zwan
2013-12-13 14:55:34 +00:00
parent a20dcbfe8c
commit 2efd751c76
9 changed files with 10 additions and 172 deletions

View File

@@ -3,7 +3,6 @@
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include)
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc)
add_subdirectory(bootsequence)
add_subdirectory(hyperion)
add_subdirectory(jsonserver)
add_subdirectory(protoserver)

View File

@@ -1,28 +0,0 @@
// stl includes
#include <cctype>
#include <algorithm>
// Bootsequence includes
#include <bootsequence/BootSequenceFactory.h>
// Effect engine includes
#include <effectengine/EffectEngine.h>
// Local Bootsequence includes
#include "EffectBootSequence.h"
BootSequence * BootSequenceFactory::createBootSequence(Hyperion * hyperion, const Json::Value & jsonConfig)
{
const std::string path = jsonConfig["path"].asString();
const std::string effectFile = jsonConfig["effect"].asString();
const unsigned duration = jsonConfig["duration_ms"].asUInt();
EffectDefinition effect;
if (EffectEngine::loadEffectDefinition(path, effectFile, effect))
{
return new EffectBootSequence(hyperion, effect, duration);
}
std::cerr << "Boot sequence could not be loaded" << std::endl;
return nullptr;
}

View File

@@ -1,25 +0,0 @@
# Define the current source locations
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/bootsequence)
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/bootsequence)
# Group the headers that go through the MOC compiler
SET(BootsequenceHEADERS
${CURRENT_HEADER_DIR}/BootSequence.h
${CURRENT_HEADER_DIR}/BootSequenceFactory.h
${CURRENT_SOURCE_DIR}/EffectBootSequence.h
)
SET(BootsequenceSOURCES
${CURRENT_SOURCE_DIR}/BootSequenceFactory.cpp
${CURRENT_SOURCE_DIR}/EffectBootSequence.cpp
)
add_library(bootsequence
${BootsequenceHEADERS}
${BootsequenceSOURCES}
)
target_link_libraries(bootsequence
hyperion
${QT_LIBRARIES})

View File

@@ -1,18 +0,0 @@
#include "EffectBootSequence.h"
EffectBootSequence::EffectBootSequence(Hyperion *hyperion, const EffectDefinition &effect, const unsigned duration_ms) :
BootSequence(),
_hyperion(hyperion),
_effect(effect),
_duration_ms(duration_ms)
{
}
EffectBootSequence::~EffectBootSequence()
{
}
void EffectBootSequence::start()
{
_hyperion->setEffectScript(_effect.script, _effect.args, 0, _duration_ms);
}

View File

@@ -1,38 +0,0 @@
#pragma once
// Bootsequence include
#include <bootsequence/BootSequence.h>
// Hyperion includes
#include <hyperion/Hyperion.h>
///
/// The EffectBootSequence runs a script using the effect engine at startup
///
class EffectBootSequence : public BootSequence
{
public:
///
/// Constructs the effect boot-sequence. The effect engine is used for executing the boot effect. The given
/// duration is the length the effect will run.
///
/// @param[in] hyperion The Hyperion instance
/// @param[in] effect The effect definition
/// @param[in] duration_ms The length of the sequence [ms]
///
EffectBootSequence(Hyperion * hyperion, const EffectDefinition & effect, const unsigned duration_ms);
virtual ~EffectBootSequence();
virtual void start();
private:
/// The Hyperion instance
Hyperion * _hyperion;
/// The script to execute
const EffectDefinition _effect;
/// Duration of the boot sequence
const unsigned _duration_ms;
};