Ham-Device-FT950
view release on metacpan or search on metacpan
lib/Ham/Device/FT950.pm view on Meta::CPAN
474475476477478479480481482483484485486487488489490491492493494495496497# Sub statBSY
#
# Retrieves status of BUSY light on
# front of Rig.
# Returns 1 if ON
# Returns 0 if OFF
# Return undef is error or don't know
eval
{
sub
statBSY {
my
$self
=
shift
;
my
(
$busy
,
$result
);
unless
(
$result
=
$self
->writeCmd(
'BY;'
)) {
return
undef
; }
$busy
=
$self
->readResult();
$busy
=~ /BY(\d+)\;/;
my
$b
= $1;
if
(
$b
== 10) {
return
1;
}
else
{
return
0; }
}
};
###########################################
#
# Sub setMOX
#
lib/Ham/Device/FT950.pm view on Meta::CPAN
554555556557558559560561562563564565566567568569570571572573574575576577# Sub statTX
#
# Retrieves TX status of Rig
# Returns 0 if Radio TX Off CAT TX OFF
# Returns 1 if Radio TX Off CAT TX ON
# Returns 2 if Radio TX ON CAT TX OFF
# Return undef is error or don't know
eval
{
sub
statTX {
my
$self
=
shift
;
my
(
$busy
,
$result
);
unless
(
$result
=
$self
->writeCmd(
'TX;'
)) {
return
undef
; }
$busy
=
$self
->readResult();
$busy
=~ /TX(\d)\;/;
my
$b
= $1;
if
(
$b
== 0) {
return
1;
}
elsif
(
$b
== 1) {
return
1;
}
elsif
(
$b
== 2) {
return
2;
}
else
{
return
undef
; }
}
};
lib/Ham/Device/FT950.pm view on Meta::CPAN
580581582583584585586587588589590591592593594595596597598599600601602603#
# Sub statFastStep
#
# Retrieves status of "Fast Step" Button
# Returns 0 for Off
# Returns 1 for ON
# Return undef is error or don't know
eval
{
sub
statFastStep {
my
$self
=
shift
;
my
(
$busy
,
$result
);
unless
(
$result
=
$self
->writeCmd(
'FS;'
)) {
return
undef
; }
$busy
=
$self
->readResult();
$busy
=~ /FS(\d)\;/;
my
$b
= $1;
if
(
$b
== 0) {
return
0;
}
elsif
(
$b
== 1) {
return
1;
}
else
{
return
undef
;
}
}
};
( run in 0.251 second using v1.01-cache-2.11-cpan-ec4f86ec37b )