Added a menu to check info
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#ifndef MENU_H
|
||||
#define MENU_H
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <U8g2lib.h>
|
||||
|
||||
enum class MenuAction
|
||||
{
|
||||
ShowHelloWorld,
|
||||
BackToCarousel
|
||||
};
|
||||
|
||||
class Menu
|
||||
{
|
||||
public:
|
||||
Menu();
|
||||
void draw(U8G2 &u8g2);
|
||||
void nextOption();
|
||||
MenuAction select();
|
||||
bool consumeDirty();
|
||||
void requestRedraw();
|
||||
|
||||
private:
|
||||
size_t selectedIndex_;
|
||||
bool dirty_;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "am2302_sensor.h"
|
||||
|
||||
void drawScreen1(U8G2 &u8g2);
|
||||
void drawHelloWorldScreen(U8G2 &u8g2);
|
||||
void setEnvironmentReading(Am2302Reading reading);
|
||||
void drawEnvironmentScreen(U8G2 &u8g2);
|
||||
void drawWeatherIconScreen(U8G2 &u8g2);
|
||||
|
||||
Reference in New Issue
Block a user