Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vecs
FIJI Public
Commits
50a21e22
Commit
50a21e22
authored
Aug 24, 2017
by
Christian Fibich
Committed by
Stefan Tauner
May 04, 2018
Browse files
(Windows) Descriptive error message if no serial port is connected
parent
fc3cf2e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/FIJI/Utils.pm
View file @
50a21e22
...
...
@@ -190,12 +190,17 @@ sub get_uart_devs {
my
$choices
=
[]
;
my
@s
;
if
(
$^O
eq
"
MSWin32
")
{
my
$reg
=
new
Win32::
TieRegistry
("
LMachine
\\
Hardware
\\
DEVICEMAP
\\
SERIALCOMM
\\
",{
Access
=>
Win32::TieRegistry::
KEY_READ
(),
Delimiter
=>
"
\\
"});
my
$reg
=
new
Win32::
TieRegistry
("
LMachine
\\
Hardware
\\
DEVICEMAP
\\
",{
Access
=>
Win32::TieRegistry::
KEY_READ
(),
Delimiter
=>
"
\\
"});
if
(
!
defined
$reg
)
{
$logger
->
error
("
Can't access registry key: $^E
");
}
else
{
foreach
my
$port
(
$reg
->
ValueNames
)
{
push
(
@s
,
$reg
->
GetValue
(
$port
));
my
$serialcomm
=
$reg
->
Open
("
SERIALCOMM
\\
");
if
(
!
defined
$serialcomm
)
{
$logger
->
error
("
No serial ports found: $^E
");
}
else
{
foreach
my
$port
(
$serialcomm
->
ValueNames
)
{
push
(
@s
,
$serialcomm
->
GetValue
(
$port
));
}
}
}
}
elsif
(
$^O
eq
"
cygwin
")
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment