-
Notifications
You must be signed in to change notification settings - Fork 0
/
Menu.h
81 lines (72 loc) · 1.81 KB
/
Menu.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
Copyright 2017 Evandro Pires Alves
This file is part of Frigorífico.
Frigorífico is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Frigorífico is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Frigorífico. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef HEADER_MENU
#define HEADER_MENU
#include "Arduino.h"
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include "Remote.h"
#include "Sensor.h"
#define MENU_INFO 0
#define MENU_SENSOR1 1
#define MENU_SENSOR2 2
#define MENU_SENSOR3 3
#define MENU_RESET 4
#define MENU_ITEMS 5
class Menu {
public:
Menu();
int menu_selected = -1;
void home();
void next();
void prev();
void exec();
void clear(byte);
void decode(decode_results);
private:
struct t_menu {
String text;
byte id;
} menus[MENU_ITEMS];
int menu_current = 1;
LiquidCrystal_I2C *lcd = NULL;
bool lcd_backlight = true;
Sensor *ntc1 = NULL, *ntc2 = NULL, *ntc3 = NULL;
void showSensor(Sensor *);
void doReset();
void storeMin();
void storeMax();
byte temp_low[8] = {
B00100,
B00100,
B00100,
B00100,
B00100,
B10101,
B01110,
B00100,
};
byte temp_high[8] = {
B00100,
B01110,
B10101,
B00100,
B00100,
B00100,
B00100,
B00100,
};
};
#endif