forked from micked99/ICT-v5-ATGM336
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Timing.h
42 lines (38 loc) · 987 Bytes
/
Timing.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
void TXencode() {
if (telemetry_set) {
call_telem();
loc_dbm_telem();
setModeWSPR_telem();
telemetry_set = false;
}
else {
loc4calc();
setModeWSPR();
}
GPS_VCC_off(); delay(10);
rf_on();
freq = WSPR_FREQ;
encode();
rf_off(); delay(5);
GPS_VCC_on();
}
void TXtiming() // Timing
{
if ((timeStatus() == timeSet) && (second() == 0) && (minute() >= 0))
{
setGPStime();
if ((minute() % 10 == 0) && (second() <= 0)) { // 00 - TX WSPR standard message
TXencode();
}
else if ((minute() % 10 == 2) && (second() <= 0) ) { // 02 - TX WSPR telemetry message
telemetry_set = true; // 02 is WSPR telemetry
TXencode();
}
else if ((minute() % 10 == 4) && (second() <= 0) ) { // 04 - TX WSPR standard message
TXencode();
}
else if ((minute() % 10 == 8) && (second() <= 0) ) { // 08 - TX WSPR telemetry message
TXencode();
}
}
}