Created first draft of 'hyperion-d'.

This commit is contained in:
T. van der Zwan
2013-08-14 08:54:49 +00:00
parent b411b166ae
commit 7bdd10859e
6 changed files with 77 additions and 25 deletions

View File

@@ -2,15 +2,33 @@
// QT includes
#include <QCoreApplication>
// Json-Schema includes
#include <utils/jsonschema/JsonFactory.h>
// Hyperion includes
#include <hyperion/DispmanxWrapper.h>
#include <hyperion/Hyperion.h>
int main(int argc, char** argv)
{
QCoreApplication app(argc, argv);
// Select config and schema file
const std::string homeDir = getenv("RASPILIGHT_HOME");
const std::string schemaFile = homeDir + "/hyperion.schema.json";
const std::string configFile = homeDir + "/hyperion.config.json";
DispmanxWrapper dispmanx;
// Load configuration and check against the schema at the same time
Json::Value config;
if (JsonFactory::load(schemaFile, configFile, config) < 0)
{
std::cerr << "UNABLE TO LOAD CONFIGURATION" << std::endl;
return -1;
}
Hyperion hyperion(config);
DispmanxWrapper dispmanx(64, 64, 10, &hyperion);
dispmanx.start();
app.exec();