-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLSB.cs
31 lines (24 loc) · 1.14 KB
/
LSB.cs
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
class LSB : Qso
{
protected string _mode = "LSB";
protected override void setRx()
{
Console.Write("what is the other station's RST (i.e 59) : ");
string input = Console.ReadLine();
int firstTwoChars = int.Parse(input.Length >= 2 ? input.Substring(0, 2) : input); //takes first to characters. If it is shorter than 2, take the whole input.
_rstRx = firstTwoChars;
}
protected override void setTx()
{
Console.Write("what is the your station's RST (i.e 59) : ");
string input = Console.ReadLine();
int firstTwoChars = int.Parse(input.Length >= 2 ? input.Substring(0, 2) : input); //takes first to characters. If it is shorter than 2, take the whole input.
_rstTx = firstTwoChars;
}
public override string exportAdi()
{
string adifContent = "";
adifContent += $"<CALL:{_callsign.Length}>{_callsign}<BAND:{_frequency.ToString().Length}>{_frequency}<MODE:{_mode.Length}>{_mode}<RST_SENT:{_rstTx.ToString().Length}>{_rstTx}<RST_RCVD:{_rstRx.ToString().Length}>{_rstRx}<QTH:{_state.Length}>{_state}<TIME_ON:15>{_date}\n";
return adifContent;
}
}