Changeset 272 for PinConnection/UCommSerialPort.pas
- Timestamp:
- Aug 30, 2011, 3:50:15 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
PinConnection/UCommSerialPort.pas
r258 r272 29 29 procedure TCommSerialPort.ReceiveData(Stream: TMemoryStream); 30 30 begin 31 Pin.Send(Stream);31 if Active then Pin.Send(Stream); 32 32 end; 33 33 … … 51 51 procedure TCommSerialPort.Receive(Sender: TCommPin; Stream: TStream); 52 52 begin 53 Stream.Position := 0; 54 repeat 55 try 56 Lock.Acquire; 57 if CanWrite(0) then 58 SendStreamRaw(Stream); 59 finally 60 Lock.Release; 61 end; 62 if Stream.Position <> Stream.Size then 63 Sleep(1); 64 until Stream.Position = Stream.Size; 53 if Active then begin 54 Stream.Position := 0; 55 repeat 56 try 57 Lock.Acquire; 58 if CanWrite(0) then 59 SendStreamRaw(Stream); 60 finally 61 Lock.Release; 62 end; 63 if Stream.Position <> Stream.Size then 64 Sleep(1); 65 until Stream.Position = Stream.Size; 66 end; 65 67 end; 66 68
Note:
See TracChangeset
for help on using the changeset viewer.