Display Interface/Infrastructure#
Standup Records#
Requirements#
New Interface PercentageDisplay#
There is a new interface, PercentageDisplay, defined in
percentage-display.h
class PercentageDisplay
{
public:
virtual ~PercentageDisplay() = default;
virtual void show_percentage(double) = 0;
};
Existing Implementations#
We have two implementations that show temperatures; put those under this interface.
Composite Display#
Implement a Composite display.
Testing: Breadboard Acrobatics, Demo Program#
Wire onto the breadboard
Eight (say) LEDs, each connected to a GPIO
Write one test program demo/display-demo) that
instantiates both classes
Store pointers to both objects in a
std::vector<PercentageDisplay*>Enter a loop that changes the percentage shown on each periodically
That program is already there, in
src_demos/main.cpp, together with much of theDisplaystuff. Clean it up.