kopia lustrzana https://github.com/Hamlib/Hamlib
Merge GitHub PR #1865
commit
4340198076
|
@ -12,6 +12,7 @@ rigctld
|
||||||
rigctlsync
|
rigctlsync
|
||||||
rigctltcp
|
rigctltcp
|
||||||
rigfreqwalk
|
rigfreqwalk
|
||||||
|
rigmatrix
|
||||||
rigmem
|
rigmem
|
||||||
rigsmtr
|
rigsmtr
|
||||||
rigswr
|
rigswr
|
||||||
|
|
|
@ -16,8 +16,9 @@ DISTCLEANFILES = rigctl.log rigctl.sum testbcd.log testbcd.sum
|
||||||
|
|
||||||
bin_PROGRAMS = rigctl rigctld rigmem rigsmtr rigswr rotctl rotctld rigctlcom rigctltcp rigctlsync ampctl ampctld rigtestmcast rigtestmcastrx $(TESTLIBUSB) rigfreqwalk
|
bin_PROGRAMS = rigctl rigctld rigmem rigsmtr rigswr rotctl rotctld rigctlcom rigctltcp rigctlsync ampctl ampctld rigtestmcast rigtestmcastrx $(TESTLIBUSB) rigfreqwalk
|
||||||
|
|
||||||
#check_PROGRAMS = dumpmem testrig testrigopen testrigcaps testtrn testbcd testfreq listrigs testloc rig_bench testcache cachetest cachetest2 testcookie testgrid testsecurity
|
|
||||||
check_PROGRAMS = dumpmem testrig testrigopen testrigcaps testtrn testbcd testfreq listrigs testloc rig_bench testcache cachetest cachetest2 testcookie testgrid hamlibmodels testmW2power test2038
|
check_PROGRAMS = dumpmem testrig testrigopen testrigcaps testtrn testbcd testfreq listrigs testloc rig_bench testcache cachetest cachetest2 testcookie testgrid hamlibmodels testmW2power test2038
|
||||||
|
# Document building testsecurity
|
||||||
|
### check_PROGRAMS += testsecurity
|
||||||
|
|
||||||
RIGCOMMONSRC = rigctl_parse.c rigctl_parse.h dumpcaps.c dumpstate.c uthash.h rig_tests.c rig_tests.h dumpcaps.h
|
RIGCOMMONSRC = rigctl_parse.c rigctl_parse.h dumpcaps.c dumpstate.c uthash.h rig_tests.c rig_tests.h dumpcaps.h
|
||||||
ROTCOMMONSRC = rotctl_parse.c rotctl_parse.h dumpcaps_rot.c uthash.h dumpcaps_rot.h
|
ROTCOMMONSRC = rotctl_parse.c rotctl_parse.h dumpcaps_rot.c uthash.h dumpcaps_rot.h
|
||||||
|
@ -32,8 +33,6 @@ rotctl_SOURCES = rotctl.c $(ROTCOMMONSRC)
|
||||||
rotctld_SOURCES = rotctld.c $(ROTCOMMONSRC)
|
rotctld_SOURCES = rotctld.c $(ROTCOMMONSRC)
|
||||||
ampctl_SOURCES = ampctl.c $(AMPCOMMONSRC)
|
ampctl_SOURCES = ampctl.c $(AMPCOMMONSRC)
|
||||||
ampctld_SOURCES = ampctld.c $(AMPCOMMONSRC)
|
ampctld_SOURCES = ampctld.c $(AMPCOMMONSRC)
|
||||||
rigswr_SOURCES = rigswr.c
|
|
||||||
rigsmtr_SOURCES = rigsmtr.c
|
|
||||||
rigmem_SOURCES = rigmem.c memsave.c memload.c memcsv.c
|
rigmem_SOURCES = rigmem.c memsave.c memload.c memcsv.c
|
||||||
if HAVE_LIBUSB
|
if HAVE_LIBUSB
|
||||||
rigtestlibusb_SOURCES = rigtestlibusb.c
|
rigtestlibusb_SOURCES = rigtestlibusb.c
|
||||||
|
@ -166,4 +165,4 @@ test2038.sh:
|
||||||
echo 'LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(top_builddir)/dummy/.libs ./test2038 1' > test2038.sh
|
echo 'LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(top_builddir)/dummy/.libs ./test2038 1' > test2038.sh
|
||||||
chmod +x ./test2038.sh
|
chmod +x ./test2038.sh
|
||||||
|
|
||||||
CLEANFILES = testrig.sh testfreq.sh testbcd.sh testloc.sh testrigcaps.sh testcache.sh testcookie.sh rigtestlibusb build-w32.sh build-w64.sh build-w64-jtsdk.sh testgrid.sh testrigcaps.sh test2038.sh tuner_control.log
|
CLEANFILES = rigmatrix testrig.sh testfreq.sh testbcd.sh testloc.sh testrigcaps.sh testcache.sh testcookie.sh rigtestlibusb build-w32.sh build-w64.sh build-w64-jtsdk.sh testgrid.sh testrigcaps.sh test2038.sh tuner_control.log
|
||||||
|
|
|
@ -2108,313 +2108,3 @@ declare_proto_amp(send_cmd)
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 'L' */
|
|
||||||
/*
|
|
||||||
declare_proto_amp(lonlat2loc)
|
|
||||||
{
|
|
||||||
unsigned char loc[MAXARGSZ + 1];
|
|
||||||
double lat, lon;
|
|
||||||
int err, pair;
|
|
||||||
|
|
||||||
CHKSCN1ARG(sscanf(arg1, "%lf", &lon));
|
|
||||||
CHKSCN1ARG(sscanf(arg2, "%lf", &lat));
|
|
||||||
CHKSCN1ARG(sscanf(arg3, "%d", &pair));
|
|
||||||
|
|
||||||
pair /= 2;
|
|
||||||
|
|
||||||
err = longlat2locator(lon, lat, (char *)&loc, pair);
|
|
||||||
|
|
||||||
if (err != RIG_OK)
|
|
||||||
{
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg4);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%s%c", loc, resp_sep);
|
|
||||||
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* 'l' */
|
|
||||||
/*
|
|
||||||
declare_proto_amp(loc2lonlat)
|
|
||||||
{
|
|
||||||
unsigned char loc[MAXARGSZ + 1];
|
|
||||||
double lat, lon;
|
|
||||||
int status;
|
|
||||||
|
|
||||||
CHKSCN1ARG(sscanf(arg1, "%s", (char *)&loc));
|
|
||||||
|
|
||||||
status = locator2longlat(&lon, &lat, (const char *)loc);
|
|
||||||
|
|
||||||
if (status != RIG_OK)
|
|
||||||
{
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg2);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%f%c", lon, resp_sep);
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg3);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%f%c", lat, resp_sep);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* 'D' */
|
|
||||||
/*
|
|
||||||
declare_proto_amp(d_m_s2dec)
|
|
||||||
{
|
|
||||||
int deg, min, sw;
|
|
||||||
double sec, dec_deg;
|
|
||||||
|
|
||||||
CHKSCN1ARG(sscanf(arg1, "%d", °));
|
|
||||||
CHKSCN1ARG(sscanf(arg2, "%d", &min));
|
|
||||||
CHKSCN1ARG(sscanf(arg3, "%lf", &sec));
|
|
||||||
CHKSCN1ARG(sscanf(arg4, "%d", &sw));
|
|
||||||
|
|
||||||
dec_deg = dms2dec(deg, min, sec, sw);
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg5);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%lf%c", dec_deg, resp_sep);
|
|
||||||
|
|
||||||
return RIG_OK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* 'd' */
|
|
||||||
/*
|
|
||||||
declare_proto_amp(dec2d_m_s)
|
|
||||||
{
|
|
||||||
int deg, min, sw, err;
|
|
||||||
double sec, dec_deg;
|
|
||||||
|
|
||||||
CHKSCN1ARG(sscanf(arg1, "%lf", &dec_deg));
|
|
||||||
|
|
||||||
err = dec2dms(dec_deg, °, &min, &sec, &sw);
|
|
||||||
|
|
||||||
if (err != RIG_OK)
|
|
||||||
{
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg2);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%d%c", deg, resp_sep);
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg3);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%d%c", min, resp_sep);
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg4);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%lf%c", sec, resp_sep);
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg5);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%d%c", sw, resp_sep);
|
|
||||||
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* 'E' */
|
|
||||||
/*
|
|
||||||
declare_proto_amp(d_mm2dec)
|
|
||||||
{
|
|
||||||
int deg, sw;
|
|
||||||
double dec_deg, min;
|
|
||||||
|
|
||||||
CHKSCN1ARG(sscanf(arg1, "%d", °));
|
|
||||||
CHKSCN1ARG(sscanf(arg2, "%lf", &min));
|
|
||||||
CHKSCN1ARG(sscanf(arg3, "%d", &sw));
|
|
||||||
|
|
||||||
dec_deg = dmmm2dec(deg, min, sw);
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg4);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%lf%c", dec_deg, resp_sep);
|
|
||||||
|
|
||||||
return RIG_OK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* 'e' */
|
|
||||||
/*
|
|
||||||
declare_proto_amp(dec2d_mm)
|
|
||||||
{
|
|
||||||
int deg, sw, err;
|
|
||||||
double min, dec_deg;
|
|
||||||
|
|
||||||
CHKSCN1ARG(sscanf(arg1, "%lf", &dec_deg));
|
|
||||||
|
|
||||||
err = dec2dmmm(dec_deg, °, &min, &sw);
|
|
||||||
|
|
||||||
if (err != RIG_OK)
|
|
||||||
{
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg2);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%d%c", deg, resp_sep);
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg3);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%lf%c", min, resp_sep);
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg4);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%d%c", sw, resp_sep);
|
|
||||||
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* 'B' */
|
|
||||||
/*
|
|
||||||
declare_proto_amp(coord2qrb)
|
|
||||||
{
|
|
||||||
double lon1, lat1, lon2, lat2, dist, az;
|
|
||||||
int err;
|
|
||||||
|
|
||||||
CHKSCN1ARG(sscanf(arg1, "%lf", &lon1));
|
|
||||||
CHKSCN1ARG(sscanf(arg2, "%lf", &lat1));
|
|
||||||
CHKSCN1ARG(sscanf(arg3, "%lf", &lon2));
|
|
||||||
CHKSCN1ARG(sscanf(arg4, "%lf", &lat2));
|
|
||||||
|
|
||||||
err = qrb(lon1, lat1, lon2, lat2, &dist, &az);
|
|
||||||
|
|
||||||
if (err != RIG_OK)
|
|
||||||
{
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg5);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%lf%c", dist, resp_sep);
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg6);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%lf%c", az, resp_sep);
|
|
||||||
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* 'A' */
|
|
||||||
/*
|
|
||||||
declare_proto_amp(az_sp2az_lp)
|
|
||||||
{
|
|
||||||
double az_sp, az_lp;
|
|
||||||
|
|
||||||
CHKSCN1ARG(sscanf(arg1, "%lf", &az_sp));
|
|
||||||
|
|
||||||
az_lp = azimuth_long_path(az_sp);
|
|
||||||
|
|
||||||
if (az_lp < 0)
|
|
||||||
{
|
|
||||||
return -RIG_EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg2);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%lf%c", az_lp, resp_sep);
|
|
||||||
|
|
||||||
return RIG_OK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* 'a' */
|
|
||||||
/*
|
|
||||||
declare_proto_amp(dist_sp2dist_lp)
|
|
||||||
{
|
|
||||||
double dist_sp, dist_lp;
|
|
||||||
|
|
||||||
CHKSCN1ARG(sscanf(arg1, "%lf", &dist_sp));
|
|
||||||
|
|
||||||
dist_lp = distance_long_path(dist_sp);
|
|
||||||
|
|
||||||
if ((interactive && prompt) || (interactive && !prompt && ext_resp))
|
|
||||||
{
|
|
||||||
fprintf(fout, "%s: ", cmd->arg2);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(fout, "%lf%c", dist_lp, resp_sep);
|
|
||||||
|
|
||||||
return RIG_OK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* '0x8c'--pause processing */
|
|
||||||
/*
|
|
||||||
declare_proto_amp(pause)
|
|
||||||
{
|
|
||||||
unsigned seconds;
|
|
||||||
CHKSCN1ARG(sscanf(arg1, "%u", &seconds));
|
|
||||||
sleep(seconds);
|
|
||||||
return RIG_OK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
|
@ -55,7 +55,6 @@ struct rig_type_s rig_type[] =
|
||||||
{RIG_FLAG_APRS, "APRS"},
|
{RIG_FLAG_APRS, "APRS"},
|
||||||
{RIG_FLAG_TNC, "TNC"},
|
{RIG_FLAG_TNC, "TNC"},
|
||||||
{RIG_FLAG_DXCLUSTER, "DxCluster"},
|
{RIG_FLAG_DXCLUSTER, "DxCluster"},
|
||||||
{RIG_FLAG_DXCLUSTER, "DxCluster"},
|
|
||||||
{RIG_FLAG_TUNER, "Tuner"},
|
{RIG_FLAG_TUNER, "Tuner"},
|
||||||
{-1, "?\n"}
|
{-1, "?\n"}
|
||||||
};
|
};
|
||||||
|
|
|
@ -54,7 +54,6 @@ static struct rig_type_s rig_type[] =
|
||||||
{RIG_FLAG_APRS, "APRS"},
|
{RIG_FLAG_APRS, "APRS"},
|
||||||
{RIG_FLAG_TNC, "TNC"},
|
{RIG_FLAG_TNC, "TNC"},
|
||||||
{RIG_FLAG_DXCLUSTER, "DxCluster"},
|
{RIG_FLAG_DXCLUSTER, "DxCluster"},
|
||||||
{RIG_FLAG_DXCLUSTER, "DxCluster"},
|
|
||||||
{RIG_FLAG_TUNER, "Tuner"},
|
{RIG_FLAG_TUNER, "Tuner"},
|
||||||
{-1, "?\n"}
|
{-1, "?\n"}
|
||||||
};
|
};
|
||||||
|
|
Ładowanie…
Reference in New Issue