-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal.cpp
More file actions
48 lines (48 loc) · 1.36 KB
/
global.cpp
File metadata and controls
48 lines (48 loc) · 1.36 KB
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
//-----------------------------------------------------------------------------
#include "avr-debug/debug.h"
#include "data.h"
#include "global.h"
#include "body.h"
#include "RTD2660AVR/display.h"
//-----------------------------------------------------------------------------
CFontArea* disp_buttons[8];
BYTE_DATA selectorAT = 0;
WORD_DATA timer = 1; // in seconds
BYTE displayMode = DISP_MODE_NORMAL;
//-----------------------------------------------------------------------------
void displayGlobal()
{
static WORD R_timer = 1;
if(ignition)
{
if(selectorAT.changed())
{
if(selectorAT.value == 0x40)
{
R_timer = timer + REAR_VIDEO_DELAY;
}
else
{
display.hideVideo();
OSD.show(&OSD.maps[0]);
displayMode = DISP_MODE_NORMAL;
R_timer = 0;
}
}
if(timer == R_timer)
{
OSD.hide();
display.showVideo(VS_AV2);
displayMode = DISP_MODE_VIDEO;
R_timer = 0;
}
}
else
{
display.hideVideo();
OSD.show(&OSD.maps[0]);
displayMode = DISP_MODE_NORMAL;
R_timer = 0;
}
}
//-----------------------------------------------------------------------------