46 lines
820 B
C++
46 lines
820 B
C++
/*
|
|
* DisplayController.h
|
|
*
|
|
* Created on: Aug 7, 2018
|
|
* Author: rhetenor
|
|
*/
|
|
|
|
#ifndef _SRC_OUTPUT_DISPLAYCONTROLLER_H_
|
|
#define _SRC_OUTPUT_DISPLAYCONTROLLER_H_
|
|
|
|
#include "IDisplayController.h"
|
|
|
|
#include <vector>
|
|
#include <thread>
|
|
|
|
#include "IDisplay.h"
|
|
#include "utility/IOutputGPIOInterface.h"
|
|
|
|
namespace flippR_driver
|
|
{
|
|
namespace output
|
|
{
|
|
|
|
class DisplayController : public IDisplayController
|
|
{
|
|
public:
|
|
explicit DisplayController(std::vector<std::shared_ptr<IDisplay>> displays, std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface);
|
|
~DisplayController();
|
|
|
|
private:
|
|
void cycle_displays();
|
|
|
|
private:
|
|
std::vector<std::shared_ptr<IDisplay>> displays;
|
|
|
|
std::thread display_cycle_thread;
|
|
|
|
std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface;
|
|
|
|
bool is_running;
|
|
};
|
|
|
|
}
|
|
}
|
|
#endif
|