Fixing two errores with networking

This commit is contained in:
Johannes Wendel
2019-10-28 16:38:33 +01:00
parent fa152c6c54
commit 8791f85857
5 changed files with 21 additions and 8 deletions

View File

@@ -0,0 +1,6 @@
[Dolphin]
Timestamp=2019,5,6,20,16,26
Version=4
[Settings]
HiddenFilesShown=true

View File

@@ -31,7 +31,7 @@ std::shared_ptr<OutputDriver> get_OutputDriver(std::istream& solenoid_config,
{
utility::LoggerFactory::CreateOutputLogger();
std::shared_ptr<std::mutex> output_pin_mutex;
auto output_pin_mutex = std::make_shared<std::mutex>();
std::shared_ptr<DriverBoardPinController> driver_board_pin_controller(new detail::DriverBoardPinController(output_pin_mutex));
auto solenoids = create_solenoids(solenoid_config, driver_board_pin_controller);

View File

@@ -15,7 +15,7 @@ namespace detail
SoundBoardPinController::SoundBoardPinController(std::shared_ptr<std::mutex> output_item_mutex,
const uint8_t &fire_address) :
output_item_mutex(std::move(output_item_mutex)),
output_item_mutex(output_item_mutex),
fire_address(fire_address)
{
CLOG(INFO, OUTPUT_LOGGER) << "Created SoundBoardPinController";

View File

@@ -29,7 +29,8 @@ Sound::Sound(std::shared_ptr<SoundBoardPinController> pin_controller, const uint
void Sound::play()
{
CLOG(INFO, OUTPUT_LOGGER) << "Play Sound " << id << " " << name;
this->play_task = std::async(std::launch::async, &Sound::playTask, this);
//this->play_task = std::async(std::launch::async, &Sound::playTask, this);
this->playTask();
}
void Sound::playTask()