# }
else {
if ($ser_speed != 0){
- my $command = "stty -F $ser_dev speed $ser_speed";
+ my $command = "stty -F $ser_dev speed $ser_speed -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke";
+ print stderr "$command\n";
$command .= " -ixoff " if $ser_type eq 'PSP';
my $res = qx($command);
}
my $x = getValue($fh,$command,$cnt++);
$x =~ s/\&//;
print $x."&" if $command =~ /\?/;
- usleep(40000) if $ser_type eq "PST";
+ usleep(40000);# if $ser_type eq "PST";
}
close $fh;
return;
sub getValue {
my ($fh,$cmd,$cnt,$forceread) = @_;
- if (0 && defined $db->{$cmd.$cnt}{tim} && $db->{$cmd.$cnt}{tim} > time()-2) {
+ if (0 && defined $db->{$cmd.$cnt}{tim} && $db->{$cmd.$cnt}{tim} > time()-10) {
return $db->{$cmd.$cnt}{val};
}
else {