forgot to push

This commit is contained in:
Johannes Wendel
2019-08-01 20:20:37 +02:00
parent 8078c94a90
commit e29f18ee6b
5 changed files with 14 additions and 15 deletions

View File

@@ -4,6 +4,8 @@
#include "DriverFactory.h"
#include "utility/LoggerFactory.h"
#include "input/InputDriverFactory.h"
#include "output/OutputDriverFactory.h"

View File

@@ -8,12 +8,12 @@
#include "PinController.h"
#include "utility/config.h"
#define NOT_PI
#ifndef NOT_PI
#include "wiringPi/wiringPi.h"
#include "wiringPi/mcp23017.h"
#endif
#ifdef NOT_PI
#include "utility/wiringPiTesting.hpp"
#endif

View File

@@ -314,7 +314,6 @@ json get_element(const std::string & name, json & object, const std::string & fi
try
{
sub_object = object.at(name);
return sub_object;
}
catch(json::exception &e)
{
@@ -322,21 +321,23 @@ json get_element(const std::string & name, json & object, const std::string & fi
exit(EXIT_FAILURE);
}
return sub_object;
}
template<typename type>
type get_value(const std::string & name, json & object, const std::string & file_name)
{
type element;
try
{
type element = object.at(name).get<type>();
return element;
element = object.at(name).get<type>();
}
catch(json::exception &e)
{
CLOG(ERROR, OUTPUT_LOGGER) << "File " << file_name << " seems to be corrupted at " << name << ": " << e.what();
exit(EXIT_FAILURE);
}
return element;
}
}