blob: e47e7b19c7d91f8106ef33d014804878b87d2cfd (
plain)
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
|
program fernbedienung;
{$mode objfpc}{$H+}
{$DEFINE UseCThreads}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, lesethreadunit
{ you can add units after this },
sysutils, lowlevelunit, irdecoderunit, gitupdateunit;
var
irDecoder: tIRDecoder;
inputDatei: string;
cnt: longint;
watte,debug: boolean;
begin
inputDatei:='';
watte:=false;
debug:=false;
for cnt:=1 to paramcount do begin
if paramstr(cnt)='-W' then begin
watte:=true;
continue;
end;
if paramstr(cnt)='-D' then begin
debug:=true;
continue;
end;
if inputDatei<>'' then
raise exception.create('Mehr als eine inputDatei angegeben!');
inputDatei:=paramstr(cnt);
end;
if inputDatei='' then
raise exception.create('Keine inputDatei angegeben!');
irDecoder:=tIRDecoder.create(inputDatei,extractfilepath(paramstr(0))+'befehle.konf',watte,debug);
repeat
repeat
while irDecoder.zeileVerarbeitet do;
until not irDecoder.befehlVerarbeitet;
sleep(100);
until false;
irDecoder.free;
end.
|