-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenuino.h
64 lines (53 loc) · 1.55 KB
/
Menuino.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//==============================================
// MENUINO manager
//----------------------------------------------
// Author: Gerard Llort Casanova
// Version: 1.1
// Copyright (c) 2021
//==============================================
#ifndef _MENUINO_H
#define _MENUINO_H
#include <Arduino.h>
#include <XpnManager.h>
#include "MenuScreen.h"
#include "SelectScreen.h"
#include "DriveScreen.h"
#include "InputScreen.h"
#include "WaitScreen.h"
#include "SetupScreen.h"
#include "InfoScreen.h"
class Menuino
{
OpenSmart32* display;
XpnManager* xpn;
Screen* scrCurrent;
MenuScreen* scrMenu;
SelectScreen* scrSelect;
DriveScreen* scrDrive;
InputScreen* scrInput;
WaitScreen* scrWait;
SetupScreen* scrSetup;
InfoScreen* scrInfo;
ScreenParams* params;
public:
//----------------------------------------------
// Constructors
//----------------------------------------------
Menuino();
//----------------------------------------------
// Methods
//----------------------------------------------
void Initialize(OpenSmart32* tft);
void Dispatch();
void ShowScreen(ScreenParams* params);
Screen* GetCurrentScreen();
//----------------------------------------------
// Event handlers
//----------------------------------------------
void HandleDisplayClick(uint16_t xpos, uint16_t ypos);
void HandleEngineNotify(XpnEngine *engine);
void HandleMasterStatusNotify(uint8_t status);
void HandleEncoderMoved(EncoderMenuSwitch::EncoderDirection dir);
void HandleEncoderClick();
};
#endif