1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-13 05:53:06 +01:00

#81: directly enable the ISR on HWCDC restart if connected

This commit is contained in:
andreas
2024-11-04 10:32:52 +01:00
parent 041b550ae9
commit 1d5577a777
2 changed files with 36 additions and 3 deletions

28
tools/log.pl Executable file
View File

@@ -0,0 +1,28 @@
#! /usr/bin/env perl
use strict;
use POSIX qw(strftime);
my ($dev,$speed)=@ARGV;
if (not defined $dev){
die "usage: $0 dev"
}
if (! -e $dev) {
die "$dev not found"
}
open(my $fh,"<",$dev) or die "unable to open $dev";
if (defined $speed){
print("setting speed $speed");
system("stty speed $speed < $dev") == 0 or die "unable to set speed";
}
my $last=0;
while (<$fh>){
my $x=time();
if ($last != 0){
if ($x > ($last+5)){
print("****gap***\n");
}
}
printf strftime("%Y/%m/%d-%H%M%S",localtime($x));
printf("[%04.2f]: ",$x-$last);
$last=$x;
print $_;
}