merged
This commit is contained in:
@@ -2,11 +2,17 @@
|
||||
"deactivation_time_milliseconds" : 10,
|
||||
"port_extenders" :
|
||||
[
|
||||
<<<<<<< HEAD
|
||||
{
|
||||
"name" : "extender_0",
|
||||
"i2c_address" : 33,
|
||||
"pin_base" : 81
|
||||
}
|
||||
=======
|
||||
"name" : "extender_0",
|
||||
"i2c_address" : 33,
|
||||
"pin_base" : 81
|
||||
>>>>>>> aa1d6409ea18cff1ad4b0ef06804fcf5a521dee9
|
||||
],
|
||||
"fire_pin" :
|
||||
{
|
||||
|
||||
@@ -39,6 +39,7 @@ std::shared_ptr<OutputDriver> get_OutputDriver(std::istream& solenoid_config,
|
||||
auto lamps = create_lamps(lamp_config, driver_board_pin_controller);
|
||||
|
||||
uint8_t sound_fire_address = get_sound_fire_address(sound_config);
|
||||
|
||||
std::shared_ptr<SoundBoardPinController> sound_board_pin_controller(new detail::SoundBoardPinController(output_pin_mutex, sound_fire_address));
|
||||
auto sounds = create_sounds(sound_config, sound_board_pin_controller);
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@ namespace output
|
||||
namespace OutputDriverFactory
|
||||
{
|
||||
std::shared_ptr<OutputDriver> get_OutputDriver(std::istream& solenoid_config,
|
||||
std::istream& lamp_config,
|
||||
std::istream& sound_config,
|
||||
std::istream& display_config);
|
||||
std::istream& lamp_config,
|
||||
std::istream& sound_config,
|
||||
std::istream& display_config);
|
||||
|
||||
std::map<std::string, std::shared_ptr<items::Solenoid>> create_solenoids(std::istream& solenoid_config, std::shared_ptr<DriverBoardPinController> &driverBoardPinController);
|
||||
std::shared_ptr<items::detail::Solenoid> create_solenoid(nlohmann::json &solenoid_json, nlohmann::json &port_extenders, std::shared_ptr<DriverBoardPinController> &pin_controller, std::chrono::milliseconds deactivation_time);
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
#ifndef FLIPPR_DRIVER_OUTPUT_IMPL_DISPLAYPINCONTROLLER_H
|
||||
#define FLIPPR_DRIVER_OUTPUT_IMPL_DISPLAYPINCONTROLLER_H
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "output/DisplayBoardPinController.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace flippR_driver
|
||||
{
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#include "output/detail/DisplayController.h"
|
||||
|
||||
#include "output/DisplayController.h"
|
||||
|
||||
#include "utility/config.h"
|
||||
|
||||
namespace flippR_driver
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <thread>
|
||||
|
||||
#include "output/DisplayController.h"
|
||||
|
||||
#include "output/items/OutputDisplay.h"
|
||||
#include "output/DisplayBoardPinController.h"
|
||||
|
||||
|
||||
@@ -14,8 +14,7 @@ namespace detail
|
||||
{
|
||||
|
||||
SoundBoardPinController::SoundBoardPinController(std::shared_ptr<std::mutex> output_item_mutex,
|
||||
const uint8_t &fire_address
|
||||
) :
|
||||
const uint8_t &fire_address) :
|
||||
output_item_mutex(std::move(output_item_mutex)),
|
||||
fire_address(fire_address)
|
||||
{
|
||||
@@ -62,6 +61,9 @@ void SoundBoardPinController::fire_sound() const
|
||||
void SoundBoardPinController::write_pin(const uint8_t &pin, const bool &value) const
|
||||
{
|
||||
// PinController::write_pin(pins_sound.at("pin_base") + pin, value);
|
||||
// PinController::write_pin(pins_sound.at("fire"), true);
|
||||
//
|
||||
// PinController::write_pin(pins_sound.at("fire"), false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user