Skip to content

Commit

Permalink
[ui] Refactor view stack to take a GraphicDisplay
Browse files Browse the repository at this point in the history
This way it can be specialized with a monochrome or color display later.
  • Loading branch information
MatthewMArnold committed Jul 21, 2024
1 parent fa7d248 commit ee88ac7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/modm/ui/menu/communicating_view_stack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace modm
class CommunicatingViewStack : public ViewStack
{
public:
CommunicatingViewStack(modm::ColorGraphicDisplay* display, xpcc::Communicator* communicator) :
CommunicatingViewStack(modm::GraphicDisplay* display, xpcc::Communicator* communicator) :
ViewStack(display),
communicator(communicator)
{
Expand Down
6 changes: 3 additions & 3 deletions src/modm/ui/menu/view_stack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace modm
class ViewStack
{
public:
ViewStack(modm::ColorGraphicDisplay* display);
ViewStack(modm::GraphicDisplay* display);

virtual ~ViewStack();

Expand Down Expand Up @@ -74,7 +74,7 @@ namespace modm
/**
* @brief getDisplay access underlying GraphicDisplay
*/
inline modm::ColorGraphicDisplay&
inline modm::GraphicDisplay&
getDisplay()
{
return *this->display;
Expand All @@ -100,7 +100,7 @@ namespace modm
shortButtonPress(modm::MenuButtons::Button button);

protected:
modm::ColorGraphicDisplay* display;
modm::GraphicDisplay* display;
modm::Stack< modm::AbstractView* , modm::LinkedList< modm::AbstractView* > > stack;
};
}
Expand Down

0 comments on commit ee88ac7

Please sign in to comment.