powerstat & send_morse commands

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1750 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.2
Stéphane Fillod, F8CFE 2004-06-06 21:59:54 +00:00
rodzic a21a311164
commit bf3ee98315
2 zmienionych plików z 48 dodań i 4 usunięć

Wyświetl plik

@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH RIGCTL "1" "March 28, 2003" "Hamlib"
.TH RIGCTL "1" "May 25, 2004" "Hamlib"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -256,6 +256,18 @@ Set antenna number (0, 1, 2, ..).
.B get_ant
Get antenna number (0, 1, 2, ..).
.TP
.B reset
Reset.
.TP
.B send_morse
Send morse symbols.
.TP
.B set_powerstat
Set power status.
.TP
.B get_powerstat
Get power status.
.TP
.B _, get_info
Get misc information about the rig.
.TP
@ -279,7 +291,7 @@ Report bugs to <hamlib-developer@users.sourceforge.net>.
.br
I'm already aware of the bug in the previous section :-)
.SH COPYRIGHT
Copyright \(co 2000-2003 Stephane Fillod & Frank Singleton.
Copyright \(co 2000-2004 Stephane Fillod & Frank Singleton.
.br
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY

Wyświetl plik

@ -1,11 +1,11 @@
/*
* rigctl.c - (C) Stephane Fillod 2000-2003
* rigctl.c - (C) Stephane Fillod 2000-2004
*
* This program test/control a radio using Hamlib.
* It takes commands in interactive mode as well as
* from command line options.
*
* $Id: rigctl.c,v 1.50 2004-05-17 21:09:45 fillods Exp $
* $Id: rigctl.c,v 1.51 2004-06-06 21:59:54 fillods Exp $
*
*
* This program is free software; you can redistribute it and/or
@ -147,6 +147,9 @@ declare_proto_rig(dump_caps);
declare_proto_rig(set_ant);
declare_proto_rig(get_ant);
declare_proto_rig(reset);
declare_proto_rig(send_morse);
declare_proto_rig(set_powerstat);
declare_proto_rig(get_powerstat);
@ -209,6 +212,9 @@ struct test_table test_list[] = {
{ 0x83, "set_ant", set_ant, ARG_IN, "Antenna" },
{ 0x84, "get_ant", get_ant, ARG_OUT, "Antenna" },
{ 0x85, "reset", reset, ARG_IN, "Reset" },
{ 0x86, "send_morse", send_morse, ARG_IN, "Morse" },
{ 0x87, "set_powerstat", set_powerstat, ARG_IN|ARG_NOVFO, "Status" },
{ 0x88, "get_powerstat", get_powerstat, ARG_OUT|ARG_NOVFO, "Status" },
{ 0x00, "", NULL },
};
@ -1628,4 +1634,30 @@ declare_proto_rig(reset)
return rig_reset(rig, reset);
}
declare_proto_rig(send_morse)
{
return rig_send_morse(rig, vfo, arg1);
}
declare_proto_rig(set_powerstat)
{
powerstat_t stat;
sscanf(arg1, "%d", &stat);
return rig_set_powerstat(rig, stat);
}
declare_proto_rig(get_powerstat)
{
int status;
powerstat_t stat;
status = rig_get_powerstat(rig, &stat);
if (status != RIG_OK)
return status;
if (interactive)
printf("%s: ", cmd->arg1);
printf("%d\n", stat);
return status;
}