-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdisplay.h
84 lines (70 loc) · 2.62 KB
/
display.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
82
83
84
/*
Generic display init and update functions
Written by Thomas Jarosch
This program 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.
This program 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 this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef DISPLAY_H
#define DISPLAY_H
//#include "Arduino.h"
void display_init();
void display_update();
//void display_debug(HardwareSerial* localSerial);
//void display_show_important_info(const char *str, int duration_secs);
//void display_show_important_info(const __FlashStringHelper *str, int duration_secs);
void display_show_welcome_msg();
void display_show_welcome_msg_temp();
void display_prev_view();
void display_next_view();
#if (DISPLAY_TYPE & DISPLAY_TYPE_16X2_SERIAL)
void display_16x_serial_enable_backlight();
void display_16x_serial_disable_backlight();
#endif
//definitions for different screen mode
typedef enum {DISPLAY_MODE_TEXT,
DISPLAY_MODE_GRAPHIC, // Note: Same as _TEXT on 16x2 displays
DISPLAY_MODE_MENU,
DISPLAY_MODE_IMPORTANT_INFO
} display_mode_type;
typedef enum {DISPLAY_VIEW_MAIN=0,
#if (DISPLAY_TYPE & DISPLAY_TYPE_NOKIA)&&(defined(DV_GRAPHIC))
DISPLAY_VIEW_GRAPHIC,
#endif
#if (DISPLAY_TYPE & DISPLAY_TYPE_16X2)
#if defined(DV_TIME)
DISPLAY_VIEW_TIME,
#endif
#if defined(DV_BATTERY)
DISPLAY_VIEW_BATTERY,
#endif
#endif
#if (defined(SUPPORT_BMP085) || defined(SUPPORT_DSPC01) || defined(SUPPORT_TEMP_SENSOR))&&defined(DV_ENVIRONMENT)
DISPLAY_VIEW_ENVIRONMENT,
#endif
#if defined(DV_HUMAN)
DISPLAY_VIEW_HUMAN,
#endif
#if defined(DV_ODOMETER)
DISPLAY_VIEW_ODOMETER,
#endif
_DISPLAY_VIEW_END
} display_view_type;
extern display_view_type display_view;
extern display_mode_type display_mode; //currently display mode
extern uint8_t display_force_text; //only valid for Nokia displays
extern uint16_t poti_stat;
extern uint16_t throttle_stat;
extern uint8_t battery_percent_fromvoltage;
extern uint8_t battery_percent_fromcapacity;
extern uint32_t wheel_time;
extern float current_display;
#endif