-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUBC125XLT.pas
executable file
·71 lines (56 loc) · 1.45 KB
/
UBC125XLT.pas
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
unit UBC125XLT;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, UBCGeneric1, Common;
type
TUbc125xlt = class(TUBCGeneric1)
function NumberOfBanks: Integer; override;
function NumberOfSlots: Integer; override;
function Model: String; override;
function ModelAliased: String; override;
function PortId: String; override;
function UpdateSlot(memory_row: TScannerMemoryRow): Boolean; override;
function SupportsDescription:Boolean; override;
end;
implementation
function TUbc125xlt.PortId: String;
begin
Result:='BC125AT';
end;
function TUbc125xlt.NumberOfBanks: Integer;
begin
Result:=10;
end;
function TUbc125xlt.NumberOfSlots: Integer;
begin
Result:=500;
end;
function TUbc125xlt.ModelAliased: String;
begin
Result:='UBC125XLT';
end;
function TUbc125xlt.Model: String;
begin
Result:='UBC125XLT';
end;
function TUbc125xlt.UpdateSlot(memory_row: TScannerMemoryRow): Boolean;
var
cmd: String;
begin
if (memory_row.Slot > 0) and
(memory_row.Slot <= NumberOfSlots) and
((memory_row.Modul = 'AM') or (memory_row.Modul = 'FM'))
then begin
// CIN,1,Okecie Approach,01288000,AM,0,2,0,0
cmd:='CIN,'+IntToStr(memory_row.Slot)+','+memory_row.FrqDescription+','+FloatToFrq(memory_row.Frq, '', true)+','+Trim(memory_row.Modul)+',0,2,0,0';
SendAndRecieve('PRG');
SendAndRecieve(cmd);
SendAndRecieve('EPG');
end;
end;
function TUbc125xlt.SupportsDescription:Boolean;
begin
Result:=true;
end;
end.