-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdisplay.ino
More file actions
executable file
·38 lines (30 loc) · 831 Bytes
/
display.ino
File metadata and controls
executable file
·38 lines (30 loc) · 831 Bytes
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
/* Regular (every Arduino loop) display processing stuff
*/
void display_stuff()
{
if (g.help_mode)
return;
// Disabling the last comment line displaying after COMMENT_DELAY interval:
if (g.comment_flag == 1 && g.t > g.t_comment + COMMENT_DELAY)
{
g.comment_flag = 0;
if (g.alt_flag == 0)
display_current_position(0);
}
#ifdef TEST_SWITCH
if (g.t - g.t_display > DISPLAY_REFRESH_TIME && g.moving == 0)
{
g.t_display = g.t;
display_current_position(0);
}
#endif
// Refreshing display (position and battery status) regularly:
if (g.stacker_mode == 0 && g.alt_flag == 0 && g.error == 0 && g.editing == 0 && g.t - g.t_display > DISPLAY_REFRESH_TIME)
{
g.t_display = g.t;
battery_status(1);
if (g.comment_flag == 0)
display_current_position(1);
}
return;
}