Added config-schema of Hyperion as resource.

Added constructor to Hyperion using filename.
Added config-filename as commandline parameter for hyperiond.
Added implementation of blackborder detector.
Added test for blackborder detector.
This commit is contained in:
T. van der Zwan
2013-08-21 14:25:27 +00:00
parent 5010b9ce8e
commit 240b118ce9
11 changed files with 327 additions and 16 deletions

View File

@@ -20,21 +20,17 @@ int main(int argc, char** argv)
QCoreApplication app(argc, argv);
std::cout << "QCoreApplication initialised" << std::endl;
// Select config and schema file
//const std::string homeDir = getenv("RASPILIGHT_HOME");
const std::string schemaFile = "hyperion.schema.json";
const std::string configFile = "hyperion.config.json";
// Load configuration and check against the schema at the same time
Json::Value config;
if (JsonFactory::load(schemaFile, configFile, config) < 0)
if (argc < 2)
{
std::cerr << "UNABLE TO LOAD CONFIGURATION" << std::endl;
return -1;
std::cout << "Missing required configuration file. Usage:" << std::endl;
std::cout << "hyperiond [config.file]" << std::endl;
return 0;
}
std::cout << "Configuration loaded from: " << configFile << std::endl;
Hyperion hyperion(config);
const std::string configFile = argv[2];
std::cout << "Selected configuration file: " << configFile.c_str() << std::endl;
Hyperion hyperion(configFile);
std::cout << "Hyperion created and initialised" << std::endl;
DispmanxWrapper dispmanx(64, 64, 10, &hyperion);