implementing displays and refactor fail
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#ifndef _SRC_OUTPUT_DISPLAY_H_
|
||||
#define _SRC_OUTPUT_DISPLAY_H_
|
||||
|
||||
#include "output/items/Display.h"
|
||||
#include "output/items/OutputDisplay.h"
|
||||
|
||||
#include <array>
|
||||
|
||||
@@ -25,7 +25,7 @@ template<int DigitCount>
|
||||
class Display : public items::Display
|
||||
{
|
||||
public:
|
||||
Display(int address, int id);
|
||||
Display(uint8_t address, uint8_t id);
|
||||
virtual ~Display() = default;
|
||||
|
||||
virtual void write_score(int score);
|
||||
@@ -38,7 +38,8 @@ public:
|
||||
std::array<uint8_t, DigitCount> content;
|
||||
|
||||
private:
|
||||
int address;
|
||||
const uint8_t id;
|
||||
const uint8_t address;
|
||||
|
||||
std::string fit_string(std::string &score_string);
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace impl
|
||||
{
|
||||
|
||||
template<int DigitCount>
|
||||
Display<DigitCount>::Display(int address, int id) :
|
||||
Display<DigitCount>::Display(uint8_t address, uint8_t id) :
|
||||
address(address),
|
||||
id(id)
|
||||
{
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// Created by rhetenor on 20.11.18.
|
||||
//
|
||||
|
||||
#ifndef FLIPPR_DRIVER_EIGHTDIGITDISPLAY_H
|
||||
#define FLIPPR_DRIVER_EIGHTDIGITDISPLAY_H
|
||||
#ifndef FLIPPR_DRIVER_OUTPUT_ITEMS_IMPL_EIGHTDIGITDISPLAY_H
|
||||
#define FLIPPR_DRIVER_OUTPUT_ITEMS_IMPL_EIGHTDIGITDISPLAY_H
|
||||
|
||||
#include "output/items/EightDigitDisplay.h"
|
||||
|
||||
@@ -16,7 +16,15 @@ namespace items
|
||||
namespace impl
|
||||
{
|
||||
|
||||
class EightDigitDisplay : public Display<8>, IEightDigitDisplay;
|
||||
class EightDigitDisplay : public Display<8>, public EightDigitDisplay
|
||||
{
|
||||
public:
|
||||
EightDigitDisplay(uint8_t address, uint8_t id) :
|
||||
Display<8>(address, id) {}
|
||||
|
||||
~EightDigitDisplay() override = default;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user