-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathleds.cpp
More file actions
60 lines (57 loc) · 1.25 KB
/
Copy pathleds.cpp
File metadata and controls
60 lines (57 loc) · 1.25 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
49
50
51
52
53
54
55
56
57
58
59
60
#include <string>
void* start_gpsled(void *arg)
{
while (1)
{
// blinks only if Time has changed since the last blink
if (LEDTime != Time)
{
LEDTime = Time;
string ledstr;
ledstr = "echo doas | sudo -S python led810blink.py";
system(ledstr.c_str());
}
usleep(10);
}
return(NULL);
}
void* start_gpslockled(void *arg)
{
while (1)
{
if (WarnCode == 'A')
{
string ledstr;
ledstr = "echo doas | sudo -S python led812blink.py";
system(ledstr.c_str());
}
usleep(10);
}
return(NULL);
}
void* start_specled(void *arg)
{
while (1)
{
string ledstr;
if (DarkInProgress == 0)
{
if (LEDSaturation != Saturation)
{
LEDSaturation = Saturation;
ledstr = "echo doas | sudo -S python led814blink.py";
system(ledstr.c_str());
}
}
else
{
if (DarkInProgress != 3)
{
ledstr = "echo doas | sudo -S python led814doubleblink.py";
system(ledstr.c_str());
}
}
usleep(10);
}
return(NULL);
}