working on big refactor

This commit is contained in:
Jonas Zeunert
2018-12-14 01:09:54 +01:00
parent f3100004b9
commit 2aee0f4f9d
67 changed files with 914 additions and 619 deletions

View File

@@ -0,0 +1,45 @@
//
// Created by rhetenor on 14.12.18.
//
#ifndef FLIPPR_DRIVER_SOUNDBOARDPINCONTROLLER_H
#define FLIPPR_DRIVER_SOUNDBOARDPINCONTROLLER_H
#include <map>
#include "output/SoundBoardPinController.h"
#include "PinController.h"
namespace flippR_driver
{
namespace output
{
namespace impl
{
class SoundBoardPinController : public PinController, public output::SoundBoardPinController
{
public:
SoundBoardPinController();
~SoundBoardPinController() override = default;
void activate(const items::Sound &sound) override;
void deactivate(const items::Sound &sound) override;
private:
void write_sound_address(uint8_t address);
void fire_sound(bool fire);
void write_pin(uint8_t pin, bool value);
private:
std::shared_ptr<std::mutex> output_item_mutex;
const std::map<std::string, uint8_t> pins_sound;
};
}
}
}
#endif //FLIPPR_DRIVER_SOUNDBOARDPINCONTROLLER_H