fixed some displays
This commit is contained in:
@@ -15,6 +15,10 @@
|
||||
#include "output/impl/DriverBoardPinController.h"
|
||||
#include "output/impl/SoundBoardPinController.h"
|
||||
|
||||
#include "output/items/impl/EightDigitDisplay.h"
|
||||
#include "output/items/impl/SevenDigitDisplay.h"
|
||||
|
||||
|
||||
namespace flippR_driver
|
||||
{
|
||||
namespace output
|
||||
@@ -280,6 +284,14 @@ std::shared_ptr<items::Display> create_display(nlohmann::json &display_json)
|
||||
{
|
||||
return std::make_shared<items::impl::EightDigitDisplay>(address, id);
|
||||
}
|
||||
else if(digits == 7)
|
||||
{
|
||||
return std::make_shared<items::impl::SevenDigitDisplay(address, id);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new std::logic_error("Display digits can either be 7 or 8");
|
||||
}
|
||||
|
||||
}
|
||||
catch(json::exception &e)
|
||||
|
||||
Reference in New Issue
Block a user