removed sounditem
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#include "IOutputGPIOInterface.h"
|
||||
|
||||
#include "output/items/DriverBoardItem.h"
|
||||
#include "output/items/SoundItem.h"
|
||||
#include "output/items/Sound.h"
|
||||
#include "output/items/IDisplay.h"
|
||||
|
||||
#include <memory>
|
||||
@@ -24,10 +24,10 @@ public:
|
||||
virtual ~IOutputGPIOInterface() = default;
|
||||
|
||||
virtual void activate(items::DriverBoardItem *driver_board_item) = 0;
|
||||
virtual void activate(items::SoundItem *sound) = 0;
|
||||
virtual void activate(items::Item *sound) = 0;
|
||||
|
||||
virtual void deactivate(items::DriverBoardItem *driver_board_item) = 0;
|
||||
virtual void deactivate(items::SoundItem *sound) = 0;
|
||||
virtual void deactivate(items::Item *sound) = 0;
|
||||
|
||||
virtual void write_display(std::shared_ptr<output::items::IDisplay> display) = 0;
|
||||
//Display gpio interface!
|
||||
|
||||
@@ -44,7 +44,7 @@ void OutputGPIOInterface::initialize_i2c_addresses()
|
||||
mcp23017Setup(pins_display.at("pin_base"), pins_display.at("i2c_address"));
|
||||
}
|
||||
|
||||
void OutputGPIOInterface::activate(items::SoundItem *sound)
|
||||
void OutputGPIOInterface::activate(items::Item *sound)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(output_item_mutex);
|
||||
|
||||
@@ -71,7 +71,7 @@ void OutputGPIOInterface::deactivate(items::DriverBoardItem *driver_board_item)
|
||||
write_data(false);
|
||||
}
|
||||
|
||||
void OutputGPIOInterface::deactivate(items::SoundItem *sound)
|
||||
void OutputGPIOInterface::deactivate(items::Item *sound)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(output_item_mutex);
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ public:
|
||||
~OutputGPIOInterface() override = default;
|
||||
|
||||
void activate(items::DriverBoardItem *driver_board_item) override;
|
||||
void activate(items::SoundItem *sound) override;
|
||||
void activate(items::Item *sound) override;
|
||||
|
||||
void deactivate(items::DriverBoardItem *driver_board_item) override;
|
||||
void deactivate(items::SoundItem *sound) override;
|
||||
void deactivate(items::Item *sound) override;
|
||||
|
||||
void write_display(std::shared_ptr<output::items::IDisplay> display) override;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace items
|
||||
{
|
||||
|
||||
Sound::Sound(std::shared_ptr<IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name, std::chrono::milliseconds deactivation_time, u_int id) :
|
||||
SoundItem(std::move(output_gpio_interface), address, std::move(name)), deactivation_time(deactivation_time), id(id)
|
||||
Item(std::move(output_gpio_interface), address, std::move(name)), deactivation_time(deactivation_time), id(id)
|
||||
{}
|
||||
|
||||
void Sound::play()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define _SRC_OUTPUT_SOUND_H_
|
||||
|
||||
#include "output/items/ISound.h"
|
||||
#include "output/items/SoundItem.h"
|
||||
#include "output/items/Item.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -23,7 +23,7 @@ namespace output
|
||||
namespace items
|
||||
{
|
||||
|
||||
class Sound : public SoundItem, public ISound
|
||||
class Sound : public Item, public ISound
|
||||
{
|
||||
public:
|
||||
u_int id;
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
//
|
||||
// Created by rhetenor on 23.11.18.
|
||||
//
|
||||
|
||||
#ifndef FLIPPR_DRIVER_ISOUNDITEM_H
|
||||
#define FLIPPR_DRIVER_ISOUNDITEM_H
|
||||
|
||||
#include "Item.h"
|
||||
|
||||
namespace flippR_driver
|
||||
{
|
||||
namespace output
|
||||
{
|
||||
namespace items
|
||||
{
|
||||
|
||||
class SoundItem : public Item
|
||||
{
|
||||
public:
|
||||
SoundItem(std::shared_ptr<IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name) :
|
||||
Item(std::move(output_gpio_interface), address, std::move(name)) {}
|
||||
~SoundItem() override = default;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif //FLIPPR_DRIVER_ISOUNDITEM_H
|
||||
Reference in New Issue
Block a user