Skip to content

ModemStatus on serialport #16

@KikePie

Description

@KikePie

On Serial Port ModemStatus is not enable, or what doing wrong..
procedure TFormMain.OnDataAppearHandler(Sender: TObject);
var
sData: AnsiString;
begin
// sData := DataPort.Pull();
if DpSerial.ModemStatus.DTR then begin // this works but never get status true and DataPort.ModemStatus.DTR doesn't work
bLESignal.Color:=clRed;
bLESignal.Active:=true;
end else if DpSerial.ModemStatus.CTS then begin
bLESignal.Color:=clbLUE;
bLESignal.Active:=true;
end else if DpSerial.ModemStatus.RTS then begin
bLESignal.Color:=clNavy;
bLESignal.Active:=true;
end else if DpSerial.ModemStatus.DSR then begin
bLESignal.Color:=clAqua;
bLESignal.Active:=true;
end else begin
bLESignal.Color:=clDefault;
bLESignal.Active:=false;
end;
SData:= DpSerial.Pull();
AppendToTerminal(sData);

end;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions