Merge branch 'sender' into sender-dlp

This commit is contained in:
Alessandro Ranellucci 2015-11-16 12:50:41 +01:00
commit 870cb3ccc4

View file

@ -325,10 +325,14 @@ sub scan_serial_ports {
# Windows
if (eval "use Win32::TieRegistry; 1") {
my $ts = Win32::TieRegistry->new("HKEY_LOCAL_MACHINE\\HARDWARE\\DEVICEMAP\\SERIALCOMM",
{ Access => Win32::TieRegistry::KEY_READ() });
{ Access => 'KEY_READ' });
if ($ts) {
# when no serial ports are available, the registry key doesn't exist and
# TieRegistry->new returns undef
$ts->Tie(\my %reg);
push @ports, sort values %reg;
}
}
} else {
# UNIX and OS X
push @ports, glob '/dev/{ttyUSB,ttyACM,tty.,cu.,rfcomm}*';