Subversion Repositories svnkaklik

Compare Revisions

No changes between revisions

Ignore whitespace Rev 5 → Rev 6

/programy/delphi/sonda/PORT.DLL
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/programy/delphi/sonda/PORTINC.PAS
0,0 → 1,46
unit PORTINC;
 
interface
 
uses windows;
 
const THEDLL='PORT.DLL';
Procedure DELAY(i:WORD); stdcall; external THEDLL;
Procedure TIMEINIT; stdcall; external THEDLL;
Function TIMEREAD: DWORD; stdcall; external THEDLL;
Procedure DELAYUS(i:DWORD); stdcall; external THEDLL;
Procedure TIMEINITUS; stdcall; external THEDLL;
Function TIMEREADUS: DWORD; stdcall; external THEDLL;
Procedure OUTPORT(PortAddr:Word; Data:byte); stdcall; external THEDLL;
Function INPORT(PortAddr:Word):Byte;stdcall; external THEDLL;
Function OPENCOM(S:PCHAR):Integer;stdcall; external THEDLL;
Function READBYTE:Integer;stdcall; external THEDLL;
Procedure SENDBYTE(d:WORD);stdcall; external THEDLL;
Procedure DTR(d:WORD);stdcall; external THEDLL;
Procedure RTS(d:WORD);stdcall; external THEDLL;
Procedure TXD(d:WORD);stdcall; external THEDLL;
Function CTS:Integer;stdcall; external THEDLL;
Function DSR:Integer;stdcall; external THEDLL;
Function RI:Integer;stdcall; external THEDLL;
Function DCD:Integer;stdcall; external THEDLL;
Procedure REALTIME(d:BOOLEAN);stdcall; external THEDLL;
Function SOUNDSETRATE(Rate:DWORD):DWORD; stdcall; external THEDLL;
Function SOUNDGETRATE:DWORD; stdcall; external THEDLL;
Function SOUNDBUSY:Boolean; stdcall; external THEDLL;
Function SOUNDIS:Boolean; stdcall; external THEDLL;
Procedure SOUNDIN(Puffer:Pchar;Size:DWORD); stdcall; external THEDLL;
Procedure SOUNDOUT(Puffer:Pchar;Size:DWORD); stdcall; external THEDLL;
Function SOUNDGETBYTES:DWORD; stdcall; external THEDLL;
Function SOUNDSETBYTES(B:DWORD):DWORD; stdcall; external THEDLL;
Procedure SOUNDCAPIN; stdcall; external THEDLL;
Procedure SOUNDCAPOUT; stdcall; external THEDLL;
Function JOYX:DWORD;stdcall; external THEDLL;
Function JOYY:DWORD;stdcall; external THEDLL;
Function JOYZ:DWORD;stdcall; external THEDLL;
Function JOYR:DWORD;stdcall; external THEDLL;
Function JOYBUTTON:DWORD;stdcall; external THEDLL;
 
implementation
 
end.
 
/programy/delphi/sonda/PORTINC.dcu
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/programy/delphi/sonda/Project1.cfg
0,0 → 1,35
-$A8
-$B-
-$C+
-$D+
-$E-
-$F-
-$G+
-$H+
-$I+
-$J-
-$K-
-$L+
-$M-
-$N+
-$O+
-$P+
-$Q-
-$R-
-$S-
-$T-
-$U-
-$V+
-$W-
-$X+
-$YD
-$Z1
-cg
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-H+
-W+
-M
-$M16384,1048576
-K$00400000
-LE"c:\program files\borland\delphi6\Projects\Bpl"
-LN"c:\program files\borland\delphi6\Projects\Bpl"
/programy/delphi/sonda/Project1.dof
0,0 → 1,89
[FileVersion]
Version=6.0
 
[Compiler]
A=8
B=0
C=1
D=1
E=0
F=0
G=1
H=1
I=1
J=0
K=0
L=1
M=0
N=1
O=1
P=1
Q=0
R=0
S=0
T=0
U=0
V=1
W=0
X=1
Y=1
Z=1
ShowHints=1
ShowWarnings=1
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
 
[Linker]
MapFile=0
OutputObjs=0
ConsoleApp=1
DebugInfo=0
RemoteSymbols=0
MinStackSize=16384
MaxStackSize=1048576
ImageBase=4194304
ExeDescription=
 
[Directories]
OutputDir=
UnitOutputDir=
PackageDLLOutputDir=
PackageDCPOutputDir=
SearchPath=
Packages=
Conditionals=
DebugSourceDirs=
UsePackages=0
 
[Parameters]
RunParams=
HostApplication=
Launcher=
UseLauncher=0
DebugCWD=
 
[Version Info]
IncludeVerInfo=0
AutoIncBuild=0
MajorVer=1
MinorVer=0
Release=0
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=1029
CodePage=1250
 
[Version Info Keys]
CompanyName=
FileDescription=
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
Comments=
/programy/delphi/sonda/Project1.dpr
0,0 → 1,13
program Project1;
 
uses
Forms,
Unit1 in 'Unit1.pas' {Form1};
 
{$R *.res}
 
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
/programy/delphi/sonda/Project1.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/programy/delphi/sonda/Project1.res
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/programy/delphi/sonda/Unit1.dcu
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/programy/delphi/sonda/Unit1.dfm
0,0 → 1,63
object Form1: TForm1
Left = 77
Top = 142
Width = 544
Height = 375
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 40
Top = 40
Width = 96
Height = 29
Caption = 'Vlchkost:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -23
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
end
object Label2: TLabel
Left = 48
Top = 88
Width = 89
Height = 29
Caption = 'Teplota:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -23
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
end
object Edit1: TEdit
Left = 144
Top = 48
Width = 73
Height = 21
TabOrder = 0
end
object Edit2: TEdit
Left = 144
Top = 96
Width = 73
Height = 21
ParentShowHint = False
ShowHint = False
TabOrder = 1
end
object Timer1: TTimer
OnTimer = Timer1Timer
Left = 104
Top = 64
end
end
/programy/delphi/sonda/Unit1.pas
0,0 → 1,59
unit Unit1;
 
interface
 
uses
PORTINC,Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
 
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Timer1: TTimer;
Edit1: TEdit;
Edit2: TEdit;
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
 
var
Form1: TForm1;
 
implementation
 
{$R *.DFM}
function citac (Kanal : Integer) : Word;
var hodnota_portu : Byte;
begin
if Kanal=1 then hodnota_portu := 1; { A0 }
if Kanal=2 then hodnota_portu := 2; { A1 }
 
RealTime (true);
TimeInitus;
OutPort($201,0); { Timer-Reset }
While((InPort ($201) and hodnota_portu) = hodnota_portu)
and (TimeReadus < 10000)do;
citac:=TimeReadus;
RealTime (false);
end;
 
procedure TForm1.Timer1Timer(Sender: TObject);
const
stupen = 1.75;
var
teplota :real;
 
begin
Edit1.Text := FloatToStr(citac(1)) + ' %';
teplota:=86;
teplota:=teplota-citac(2);
teplota:=teplota / stupen ;
Edit2.Text := FloatToStr(teplota) + ' °C';
 
end;
 
end.
/programy/delphi/sonda/Unit1.~dfm
0,0 → 1,63
object Form1: TForm1
Left = 77
Top = 142
Width = 544
Height = 375
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 40
Top = 40
Width = 96
Height = 29
Caption = 'Vlchkost:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -23
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
end
object Label2: TLabel
Left = 48
Top = 88
Width = 89
Height = 29
Caption = 'Teplota:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -23
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
end
object Edit1: TEdit
Left = 144
Top = 48
Width = 73
Height = 21
TabOrder = 0
end
object Edit2: TEdit
Left = 144
Top = 96
Width = 73
Height = 21
ParentShowHint = False
ShowHint = False
TabOrder = 1
end
object Timer1: TTimer
OnTimer = Timer1Timer
Left = 104
Top = 64
end
end
/programy/delphi/sonda/Unit1.~pas
0,0 → 1,59
unit Unit1;
 
interface
 
uses
PORTINC,Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
 
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Timer1: TTimer;
Edit1: TEdit;
Edit2: TEdit;
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
 
var
Form1: TForm1;
 
implementation
 
{$R *.DFM}
function citac (Kanal : Integer) : Word;
var hodnota_portu : Byte;
begin
if Kanal=1 then hodnota_portu := 1; { A0 }
if Kanal=2 then hodnota_portu := 2; { A1 }
 
RealTime (true);
TimeInitus;
OutPort($201,0); { Timer-Reset }
While((InPort ($201) and hodnota_portu) = hodnota_portu)
and (TimeReadus < 10000)do;
citac:=TimeReadus;
RealTime (false);
end;
 
procedure TForm1.Timer1Timer(Sender: TObject);
const
stupen = 1.75;
var
teplota :real;
 
begin
Edit1.Text := FloatToStr(citac(1)) + ' %';
teplota:=98;
teplota:=teplota-citac(2);
teplota:=teplota / stupen ;
Edit2.Text := FloatToStr(citac(2)) + ' °C';
 
end;
 
end.
/programy/delphi/sonda/vssver.scc
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property