Manual input source select via json (#143)

* implement manual source select via json interface
fix schema error

* refactoring

* add visible value to all listed prios
This commit is contained in:
redPanther
2016-07-31 22:21:35 +02:00
committed by GitHub
parent 04ab2f05f7
commit 722d4eb357
14 changed files with 208 additions and 47 deletions

View File

@@ -6,10 +6,10 @@
// Hyperion includes
#include <hyperion/PriorityMuxer.h>
PriorityMuxer::PriorityMuxer(int ledCount) :
_currentPriority(LOWEST_PRIORITY),
_activeInputs(),
_lowestPriorityInfo()
PriorityMuxer::PriorityMuxer(int ledCount)
: _currentPriority(LOWEST_PRIORITY)
, _activeInputs()
, _lowestPriorityInfo()
{
_lowestPriorityInfo.priority = LOWEST_PRIORITY;
_lowestPriorityInfo.timeoutTime_ms = -1;
@@ -46,6 +46,7 @@ const PriorityMuxer::InputInfo& PriorityMuxer::getInputInfo(const int priority)
auto elemIt = _activeInputs.find(priority);
if (elemIt == _activeInputs.end())
{
std::cout << "error " << priority << std::endl;
throw std::runtime_error("HYPERION (prioritymux) ERROR: no such priority");
}
return elemIt.value();