56 lines
1.1 KiB
C++
56 lines
1.1 KiB
C++
//
|
|
// Created by rhetenor on 20.11.18.
|
|
//
|
|
|
|
#ifndef FLIPPR_DRIVER_OUTPUT_ITEMS_IMPL_EIGHTDIGITDISPLAY_H
|
|
#define FLIPPR_DRIVER_OUTPUT_ITEMS_IMPL_EIGHTDIGITDISPLAY_H
|
|
|
|
#include "output/items/detail/Display.h"
|
|
|
|
#include "output/items/EightDigitDisplay.h"
|
|
|
|
#include "utility/config.h"
|
|
|
|
namespace flippR_driver
|
|
{
|
|
namespace output
|
|
{
|
|
namespace items
|
|
{
|
|
namespace detail
|
|
{
|
|
|
|
class EightDigitDisplay : public items::detail::Display, public items::EightDigitDisplay
|
|
{
|
|
public:
|
|
EightDigitDisplay(uint8_t address, uint8_t id) :
|
|
detail::Display(address, id)
|
|
{
|
|
CLOG(INFO, OUTPUT_LOGGER) << "Created EightDigitDisplay with address " << int{this->address} << " and id: " << int{id};
|
|
}
|
|
|
|
~EightDigitDisplay() override = default;
|
|
|
|
void write_score(unsigned int score) override
|
|
{
|
|
detail::Display::write_score(score, 8);
|
|
}
|
|
|
|
void write_content(std::string content) override
|
|
{
|
|
detail::Display::write_content(content, 8);
|
|
}
|
|
|
|
std::string get_name() const override
|
|
{
|
|
return "EightDigitDisplay " + this->id;
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endif //FLIPPR_DRIVER_EIGHTDIGITDISPLAY_H
|