forked from jeff-burright/Autopilot_ESP32_wifi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLCD.ino
72 lines (50 loc) · 1.35 KB
/
LCD.ino
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
/*********************** PRINT LCD ******************************/
void LCD(){
// set the cursor to column 0, line 1
// (note: counting begins with 0):
String RP;
int UTC_seconds;
//lcd.clear();
lcd.setCursor(0,0);
lcd.print("");
lcd.setCursor(0,0);
//if(Use_CTS)lcd.print(Waypoint_next);
//else
// lcd.print(HDG) also prints in compass (Subs) for fast print rate, prints here for more stable LCD view
// Jeff commented back in
lcd.setCursor(0, 1);
lcd.print("HDG ");
lcd.setCursor(4, 1);
lcd.print(heading,0);
if(Steering_Mode != 4)
{
lcd.setCursor(9, 1);
lcd.print("CRS ");
lcd.setCursor(13, 1);
lcd.print(heading_to_steer,0);
}
// Display whether the wheel is right or left of center
if(rudder_position > 0)
{
rudd_dir = "R";
}
else if (rudder_position < 0)
{
rudd_dir = "L";
}
else
{
rudd_dir = "C";
}
if( RUDDER_MODE == 0) // IF THERE IS A RUDDER POSITION INDICATOR
{
lcd.setCursor(9,0);
lcd.print("RUD "); // extra spaces clear old data
lcd.setCursor(13,0);
lcd.print(rudd_dir);
lcd.setCursor(14,0);
lcd.print(abs(rudder_position),0);
}
// if(MSG >0) // MSG 0 is null otherwise print message here
// {
} // END Void LCD()