kopia lustrzana https://github.com/Hamlib/Hamlib
Merge upstream and fix conflicts
commit
1cc08d2f00
9
NEWS
9
NEWS
|
@ -13,6 +13,15 @@ Version 5.x -- future
|
|||
* Change FT1000MP Mark V model names to align with FT1000MP
|
||||
|
||||
Version 4.6
|
||||
* Add -# --skip_init option to rigctl to skip rig initialization -- useful for executing commands quickly
|
||||
* rig_caps is no longer constant -- this may break some 3rd party relying on the "const" declaration. Here's an example of how to handle compatiblity.
|
||||
#ifdef RIGCAPS_NOT_CONST
|
||||
static int add_to_list(struct rig_caps* rc, void*)
|
||||
#else
|
||||
static int add_to_list(const struct rig_caps* rc, void*)
|
||||
#endif
|
||||
|
||||
* IC7610 now has IPP, DPP, and TX_INHIBIT functions set/get
|
||||
* Hamlib now starts a multicast server that sends out rig information. Does not receive commands yet.
|
||||
See README.multicast
|
||||
|
||||
|
|
|
@ -103,8 +103,9 @@ int gemini_transaction(AMP *amp, const char *cmd, char *response,
|
|||
if (response) // if response expected get it
|
||||
{
|
||||
response[0] = 0;
|
||||
int len = read_string(&rs->ampport, (unsigned char *) response, response_len, "\n",
|
||||
1, 0, 1);
|
||||
int len = read_string(&rs->ampport, (unsigned char *) response, response_len,
|
||||
"\n",
|
||||
1, 0, 1);
|
||||
|
||||
if (len < 0)
|
||||
{
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
using System;
|
||||
using Gtk;
|
||||
using UI = Gtk.Builder.ObjectAttribute;
|
||||
|
||||
namespace hamlibgui
|
||||
{
|
||||
class MainWindow : Window
|
||||
{
|
||||
[UI] private Label _label1 = null;
|
||||
[UI] private Button _button1 = null;
|
||||
|
||||
private bool connectFlag;
|
||||
|
||||
public MainWindow() : this(new Builder("MainWindow.glade")) { }
|
||||
|
||||
private MainWindow(Builder builder) : base(
|
||||
builder.GetRawOwnedObject("MainWindow"))
|
||||
{
|
||||
builder.Autoconnect(this);
|
||||
|
||||
DeleteEvent += Window_DeleteEvent;
|
||||
_button1.Clicked += Button1_Clicked;
|
||||
}
|
||||
|
||||
private void Window_DeleteEvent(object sender, DeleteEventArgs a)
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
private void Button1_Clicked(object sender, EventArgs a)
|
||||
{
|
||||
connectFlag = !connectFlag;
|
||||
|
||||
if (connectFlag)
|
||||
{
|
||||
String mytext = "Rig Connected (not really)";
|
||||
_label1.Text = mytext;
|
||||
_button1.Label = "Disconnect Rig";
|
||||
}
|
||||
else
|
||||
{
|
||||
String mytext = "Rig not Connected ";
|
||||
_label1.Text = mytext;
|
||||
_button1.Label = "Connect to Rig";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.38.2 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.18"/>
|
||||
<object class="GtkWindow" id="MainWindow">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="title" translatable="yes">Hamlib Control</property>
|
||||
<property name="default-width">480</property>
|
||||
<property name="default-height">240</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-left">4</property>
|
||||
<property name="margin-right">4</property>
|
||||
<property name="margin-top">4</property>
|
||||
<property name="margin-bottom">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="_label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Hamlib controller to go here</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="_button1">
|
||||
<property name="label" translatable="yes">Connect to Rig</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="tooltip-markup" translatable="yes">Click to connect/disconnect rig</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
|
@ -1,23 +0,0 @@
|
|||
using System;
|
||||
using Gtk;
|
||||
|
||||
namespace hamlibgui
|
||||
{
|
||||
class Program
|
||||
{
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Application.Init();
|
||||
|
||||
var app = new Application("org.hamlibgui.hamlibgui", GLib.ApplicationFlags.None);
|
||||
app.Register(GLib.Cancellable.Current);
|
||||
|
||||
var win = new MainWindow();
|
||||
app.AddWindow(win);
|
||||
|
||||
win.Show();
|
||||
Application.Run();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
This is a test of creating a portable Hamlib GUI controller using dotnet and GTK
|
||||
Should be able to compile on Windows, Linux, and MacOS
|
||||
No guarantee this will go anywhere depending on ability to talk to Hamlib via C#
|
||||
|
||||
On Windows
|
||||
dotnet new install GtkSharp.Template.CSharp
|
||||
dotnet build
|
||||
|
||||
|
||||
|
||||
|
||||
On Ubuntu I don't see the GtkSharp package -- but you can build the code generated on the Windows side.
|
||||
apt install dotnet-sdk-6.0
|
||||
dotnet build
|
||||
|
||||
|
||||
Note: On Windows you can create a skeleton GTK app
|
||||
dotnet new gtkapp
|
|
@ -1,19 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="**\*.glade" />
|
||||
<EmbeddedResource Include="**\*.glade">
|
||||
<LogicalName>%(Filename)%(Extension)</LogicalName>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="GtkSharp" Version="3.24.24.*" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -81,8 +81,7 @@ Use
|
|||
.I device
|
||||
as the file name of the port connected to the radio.
|
||||
.IP
|
||||
Often a serial port, but could be a USB to serial adapter. Typically
|
||||
.IR /dev/ttyS0 ", " /dev/ttyS1 ", " /dev/ttyUSB0 ,
|
||||
Typically /dev/ttyS0 ", " /dev/ttyS1 ", " /dev/ttyUSB0 ,
|
||||
etc. on Linux,
|
||||
.IR COM1 ", " COM2 ,
|
||||
etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations.
|
||||
|
@ -1425,6 +1424,11 @@ Can also use 1,2,3,4
|
|||
Reads GPIO1, GPIO2, GPIO3, GPIO4 on the GPIO ptt port
|
||||
Can also use 1,2,3,4
|
||||
.
|
||||
.TP
|
||||
.BR skip_init
|
||||
.EX
|
||||
Skips rig initialization -- useful when executing commands with rigctl to speed up things
|
||||
.
|
||||
.SH READLINE
|
||||
.
|
||||
If
|
||||
|
|
|
@ -127,8 +127,7 @@ Use
|
|||
.I device
|
||||
as the file name of the port connected to the radio.
|
||||
.IP
|
||||
Often a serial port, but could be a USB to serial adapter. Typically
|
||||
.IR /dev/ttyS0 ", " /dev/ttyS1 ", " /dev/ttyUSB0 ,
|
||||
Typically /dev/ttyS0 ", " /dev/ttyS1 ", " /dev/ttyUSB0 ,
|
||||
etc. on Linux,
|
||||
.IR COM1 ", " COM2 ,
|
||||
etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations.
|
||||
|
|
|
@ -61,10 +61,10 @@ int graudioiq_open(RIG *rig);
|
|||
|
||||
extern const struct confparams gnuradio_cfg_params[];
|
||||
|
||||
extern const struct rig_caps gr_caps;
|
||||
extern const struct rig_caps mc4020_caps;
|
||||
extern const struct rig_caps graudio_caps;
|
||||
extern const struct rig_caps graudioiq_caps;
|
||||
extern struct rig_caps gr_caps;
|
||||
extern struct rig_caps mc4020_caps;
|
||||
extern struct rig_caps graudio_caps;
|
||||
extern struct rig_caps graudioiq_caps;
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ static const struct gnuradio_priv_caps gr_priv_caps =
|
|||
.IF_center_freq = MHz(5.75),
|
||||
};
|
||||
|
||||
const struct rig_caps gr_caps =
|
||||
struct rig_caps gr_caps =
|
||||
{
|
||||
.rig_model = RIG_MODEL_GNURADIO,
|
||||
.model_name = "GNU Radio dev",
|
||||
|
|
|
@ -52,7 +52,7 @@ static const struct gnuradio_priv_caps graudio_priv_caps =
|
|||
};
|
||||
|
||||
|
||||
const struct rig_caps graudio_caps =
|
||||
struct rig_caps graudio_caps =
|
||||
{
|
||||
.rig_model = RIG_MODEL_GRAUDIO,
|
||||
.model_name = "GNU Radio GrAudio",
|
||||
|
@ -126,7 +126,7 @@ const struct rig_caps graudio_caps =
|
|||
.vfo_op = gnuradio_vfo_op,
|
||||
};
|
||||
|
||||
const struct rig_caps graudioiq_caps =
|
||||
struct rig_caps graudioiq_caps =
|
||||
{
|
||||
.rig_model = RIG_MODEL_GRAUDIOIQ,
|
||||
.model_name = "GNU Radio GrAudio I&Q",
|
||||
|
|
|
@ -49,7 +49,7 @@ static const struct gnuradio_priv_caps mc4020_priv_caps =
|
|||
};
|
||||
|
||||
|
||||
const struct rig_caps mc4020_caps =
|
||||
struct rig_caps mc4020_caps =
|
||||
{
|
||||
.rig_model = RIG_MODEL_MC4020,
|
||||
.model_name = "GNU Radio MC4020",
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
#ifndef _RIG_H
|
||||
#define _RIG_H 1
|
||||
|
||||
// as of 2023-11-23 rig_caps is no longer constant
|
||||
// this #define allows clients to test which declaration to use for backwards compatibility
|
||||
#define RIGCAPS_NOT_CONST 1
|
||||
|
||||
#define BUILTINFUNC 0
|
||||
|
||||
// Our shared secret password
|
||||
|
@ -152,6 +156,7 @@ typedef struct
|
|||
// cookie is 26-char time code plus 10-char (2^31-1) random number
|
||||
#define HAMLIB_COOKIE_SIZE 37
|
||||
extern int cookie_use; // this is global as once one client requests it everybody needs to honor it
|
||||
extern int skip_init; // allow rigctl to skip any radio commands at startup
|
||||
|
||||
//! @cond Doxygen_Suppress
|
||||
extern HAMLIB_EXPORT_VAR(const char) hamlib_version[];
|
||||
|
@ -287,6 +292,8 @@ typedef unsigned int tone_t;
|
|||
|
||||
/**
|
||||
* \brief Port type
|
||||
*
|
||||
* Note: All rigs may use a network:port address ( e.g. tcp/serial adapter)
|
||||
*/
|
||||
typedef enum rig_port_e {
|
||||
RIG_PORT_NONE = 0, /*!< No port */
|
||||
|
@ -1642,7 +1649,9 @@ typedef enum {
|
|||
RIG_MTYPE_MEMOPAD, /*!< Memory pad */
|
||||
RIG_MTYPE_SAT, /*!< Satellite */
|
||||
RIG_MTYPE_BAND, /*!< VFO/Band channel */
|
||||
RIG_MTYPE_PRIO /*!< Priority channel */
|
||||
RIG_MTYPE_PRIO, /*!< Priority channel */
|
||||
RIG_MTYPE_VOICE, /*!< Stored Voice Message */
|
||||
RIG_MTYPE_MORSE /*!< Morse Message */
|
||||
} chan_type_t;
|
||||
|
||||
|
||||
|
@ -2381,7 +2390,7 @@ typedef struct hamlib_port {
|
|||
int fd_sync_error_read; /*!< file descriptor for reading synchronous data error codes */
|
||||
#endif
|
||||
short timeout_retry; /*!< number of retries to make in case of read timeout errors, some serial interfaces may require this, 0 to disable */
|
||||
int post_ptt_delay; /*!< delay after PTT to allow for relays and such */
|
||||
// DO NOT ADD ANYTHING HERE UNTIL 5.0!!
|
||||
} hamlib_port_t;
|
||||
|
||||
|
||||
|
@ -2779,6 +2788,9 @@ struct rig_state {
|
|||
void *multicast_receiver_priv_data;
|
||||
rig_comm_status_t comm_status; /*!< Detailed rig control status */
|
||||
char device_id[HAMLIB_RIGNAMSIZ];
|
||||
int dual_watch; /*!< Boolean DUAL_WATCH status */
|
||||
int post_ptt_delay; /*!< delay after PTT to allow for relays and such */
|
||||
// New rig_state items go before this line ============================================
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -2791,7 +2803,7 @@ struct rig_state {
|
|||
* It is NOT fine to touch this struct AT ALL!!!
|
||||
*/
|
||||
struct rig_state_deprecated {
|
||||
/********* ENSURE YOU DO NOT EVERY MODIFY THIS STRUCTURE *********/
|
||||
/********* ENSURE YOU DO NOT EVER MODIFY THIS STRUCTURE *********/
|
||||
/********* It will remain forever to provide DLL backwards compatiblity ******/
|
||||
/*
|
||||
* overridable fields
|
||||
|
@ -3592,7 +3604,7 @@ rig_set_uplink HAMLIB_PARAMS((RIG *rig,
|
|||
extern HAMLIB_EXPORT(const char *)
|
||||
rig_get_info HAMLIB_PARAMS((RIG *rig));
|
||||
|
||||
extern HAMLIB_EXPORT(const struct rig_caps *)
|
||||
extern HAMLIB_EXPORT(struct rig_caps *)
|
||||
rig_get_caps HAMLIB_PARAMS((rig_model_t rig_model));
|
||||
|
||||
extern HAMLIB_EXPORT(const freq_range_t *)
|
||||
|
@ -3673,13 +3685,13 @@ extern HAMLIB_EXPORT(FILE *)
|
|||
rig_set_debug_file HAMLIB_PARAMS((FILE *stream));
|
||||
|
||||
extern HAMLIB_EXPORT(int)
|
||||
rig_register HAMLIB_PARAMS((const struct rig_caps *caps));
|
||||
rig_register HAMLIB_PARAMS((struct rig_caps *caps));
|
||||
|
||||
extern HAMLIB_EXPORT(int)
|
||||
rig_unregister HAMLIB_PARAMS((rig_model_t rig_model));
|
||||
|
||||
extern HAMLIB_EXPORT(int)
|
||||
rig_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rig_caps *, rig_ptr_t),
|
||||
rig_list_foreach HAMLIB_PARAMS((int (*cfunc)(struct rig_caps *, rig_ptr_t),
|
||||
rig_ptr_t data));
|
||||
|
||||
extern HAMLIB_EXPORT(int)
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
#endif
|
||||
|
||||
|
||||
const struct rig_caps *caps;
|
||||
struct rig_caps *caps;
|
||||
|
||||
// This method opens the communication port to the rig
|
||||
void open(void);
|
||||
|
|
1287
lib/cJSON.c
1287
lib/cJSON.c
Plik diff jest za duży
Load Diff
|
@ -2,7 +2,7 @@
|
|||
// precise_time.cxx
|
||||
//
|
||||
// Copyright (C) 2023
|
||||
// Dave Freese, W1HKJ
|
||||
// Dave Freese, W1HKJ
|
||||
//
|
||||
// This file is part of flrig
|
||||
//
|
||||
|
@ -28,9 +28,9 @@
|
|||
// return current tick time in seconds
|
||||
double monotonic_seconds()
|
||||
{
|
||||
static struct timeval t1;
|
||||
gettimeofday(&t1, NULL);
|
||||
return t1.tv_sec + t1.tv_usec / 1e6;
|
||||
static struct timeval t1;
|
||||
gettimeofday(&t1, NULL);
|
||||
return t1.tv_sec + t1.tv_usec / 1e6;
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -49,118 +49,132 @@ double monotonic_seconds()
|
|||
static int showme = 0;
|
||||
|
||||
#if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK)
|
||||
// If we have it, use clock_gettime and CLOCK_MONOTONIC.
|
||||
// If we have it, use clock_gettime and CLOCK_MONOTONIC.
|
||||
|
||||
#include <time.h>
|
||||
#include <time.h>
|
||||
|
||||
double monotonic_seconds() {
|
||||
if (showme) {
|
||||
showme = 0;
|
||||
}
|
||||
struct timespec time;
|
||||
// Note: Make sure to link with -lrt to define clock_gettime.
|
||||
clock_gettime(CLOCK_MONOTONIC, &time);
|
||||
return ((double) time.tv_sec) + ((double) time.tv_nsec / (NANOS_PER_SECF));
|
||||
}
|
||||
double monotonic_seconds()
|
||||
{
|
||||
if (showme)
|
||||
{
|
||||
showme = 0;
|
||||
}
|
||||
|
||||
struct timespec time;
|
||||
|
||||
// Note: Make sure to link with -lrt to define clock_gettime.
|
||||
clock_gettime(CLOCK_MONOTONIC, &time);
|
||||
|
||||
return ((double) time.tv_sec) + ((double) time.tv_nsec / (NANOS_PER_SECF));
|
||||
}
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
// If we don't have CLOCK_MONOTONIC, we might be on a Mac. There we instead
|
||||
// use mach_absolute_time().
|
||||
// If we don't have CLOCK_MONOTONIC, we might be on a Mac. There we instead
|
||||
// use mach_absolute_time().
|
||||
|
||||
#include <mach/mach_time.h>
|
||||
#include <mach/mach_time.h>
|
||||
|
||||
static mach_timebase_info_data_t info;
|
||||
static void __attribute__((constructor)) init_info() {
|
||||
mach_timebase_info(&info);
|
||||
}
|
||||
static mach_timebase_info_data_t info;
|
||||
static void __attribute__((constructor)) init_info()
|
||||
{
|
||||
mach_timebase_info(&info);
|
||||
}
|
||||
|
||||
double monotonic_seconds() {
|
||||
uint64_t time = mach_absolute_time();
|
||||
double dtime = (double) time;
|
||||
dtime *= (double) info.numer;
|
||||
dtime /= (double) info.denom;
|
||||
return dtime / NANOS_PER_SECF;
|
||||
}
|
||||
double monotonic_seconds()
|
||||
{
|
||||
uint64_t time = mach_absolute_time();
|
||||
double dtime = (double) time;
|
||||
dtime *= (double) info.numer;
|
||||
dtime /= (double) info.denom;
|
||||
return dtime / NANOS_PER_SECF;
|
||||
}
|
||||
|
||||
#elif defined(__WIN32__)
|
||||
// On Windows, use QueryPerformanceCounter and QueryPerformanceFrequency.
|
||||
// On Windows, use QueryPerformanceCounter and QueryPerformanceFrequency.
|
||||
|
||||
#include <windows.h>
|
||||
#include <windows.h>
|
||||
|
||||
static double PCFreq = 0.0;
|
||||
static double PCFreq = 0.0;
|
||||
|
||||
// According to http://stackoverflow.com/q/1113409/447288, this will
|
||||
// make this function a constructor.
|
||||
// TODO(awreece) Actually attempt to compile on windows.
|
||||
// w1hkj - builds OK on mingw32
|
||||
// According to http://stackoverflow.com/q/1113409/447288, this will
|
||||
// make this function a constructor.
|
||||
// TODO(awreece) Actually attempt to compile on windows.
|
||||
// w1hkj - builds OK on mingw32
|
||||
|
||||
static void __cdecl init_pcfreq();
|
||||
__declspec(allocate(".CRT$XCU")) void (__cdecl*init_pcfreq_)() = init_pcfreq;
|
||||
static void __cdecl init_pcfreq() {
|
||||
// Accoring to http://stackoverflow.com/a/1739265/447288, this will
|
||||
// properly initialize the QueryPerformanceCounter.
|
||||
LARGE_INTEGER li;
|
||||
int has_qpc = QueryPerformanceFrequency(&li);
|
||||
assert(has_qpc);
|
||||
static void __cdecl init_pcfreq();
|
||||
__declspec(allocate(".CRT$XCU")) void (__cdecl *init_pcfreq_)() = init_pcfreq;
|
||||
static void __cdecl init_pcfreq()
|
||||
{
|
||||
// Accoring to http://stackoverflow.com/a/1739265/447288, this will
|
||||
// properly initialize the QueryPerformanceCounter.
|
||||
LARGE_INTEGER li;
|
||||
int has_qpc = QueryPerformanceFrequency(&li);
|
||||
assert(has_qpc);
|
||||
|
||||
PCFreq = ((double) li.QuadPart) / 1000.0;
|
||||
}
|
||||
PCFreq = ((double) li.QuadPart) / 1000.0;
|
||||
}
|
||||
|
||||
double monotonic_seconds() {
|
||||
LARGE_INTEGER li;
|
||||
QueryPerformanceCounter(&li);
|
||||
return ((double) li.QuadPart) / PCFreq;
|
||||
}
|
||||
double monotonic_seconds()
|
||||
{
|
||||
LARGE_INTEGER li;
|
||||
QueryPerformanceCounter(&li);
|
||||
return ((double) li.QuadPart) / PCFreq;
|
||||
}
|
||||
|
||||
#else
|
||||
// Fall back to rdtsc. The reason we don't use clock() is this scary message
|
||||
// from the man page:
|
||||
// "On several other implementations, the value returned by clock() also
|
||||
// includes the times of any children whose status has been collected via
|
||||
// wait(2) (or another wait-type call)."
|
||||
//
|
||||
// Also, clock() only has microsecond accuracy.
|
||||
//
|
||||
// This whitepaper offered excellent advice on how to use rdtscp for
|
||||
// profiling: http://download.intel.com/embedded/software/IA/324264.pdf
|
||||
//
|
||||
// Unfortunately, we can't follow its advice exactly with our semantics,
|
||||
// so we're just going to use rdtscp with cpuid.
|
||||
//
|
||||
// Note that rdtscp will only be available on new processors.
|
||||
// Fall back to rdtsc. The reason we don't use clock() is this scary message
|
||||
// from the man page:
|
||||
// "On several other implementations, the value returned by clock() also
|
||||
// includes the times of any children whose status has been collected via
|
||||
// wait(2) (or another wait-type call)."
|
||||
//
|
||||
// Also, clock() only has microsecond accuracy.
|
||||
//
|
||||
// This whitepaper offered excellent advice on how to use rdtscp for
|
||||
// profiling: http://download.intel.com/embedded/software/IA/324264.pdf
|
||||
//
|
||||
// Unfortunately, we can't follow its advice exactly with our semantics,
|
||||
// so we're just going to use rdtscp with cpuid.
|
||||
//
|
||||
// Note that rdtscp will only be available on new processors.
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdint.h>
|
||||
|
||||
static inline uint64_t rdtsc() {
|
||||
uint32_t hi, lo;
|
||||
uint64_t hi64, lo64;
|
||||
asm volatile("rdtscp\n"
|
||||
"movl %%edx, %0\n"
|
||||
"movl %%eax, %1\n"
|
||||
"cpuid"
|
||||
: "=r" (hi), "=r" (lo) : : "%rax", "%rbx", "%rcx", "%rdx");
|
||||
hi64 = hi;
|
||||
lo64 = lo;
|
||||
return (hi64 << 32) | lo64;
|
||||
}
|
||||
static inline uint64_t rdtsc()
|
||||
{
|
||||
uint32_t hi, lo;
|
||||
uint64_t hi64, lo64;
|
||||
asm volatile("rdtscp\n"
|
||||
"movl %%edx, %0\n"
|
||||
"movl %%eax, %1\n"
|
||||
"cpuid"
|
||||
: "=r"(hi), "=r"(lo) : : "%rax", "%rbx", "%rcx", "%rdx");
|
||||
hi64 = hi;
|
||||
lo64 = lo;
|
||||
return (hi64 << 32) | lo64;
|
||||
}
|
||||
|
||||
static uint64_t rdtsc_per_sec = 0;
|
||||
static void __attribute__((constructor)) init_rdtsc_per_sec() {
|
||||
uint64_t before, after;
|
||||
static uint64_t rdtsc_per_sec = 0;
|
||||
static void __attribute__((constructor)) init_rdtsc_per_sec()
|
||||
{
|
||||
uint64_t before, after;
|
||||
|
||||
before = rdtsc();
|
||||
usleep(USECS_PER_SEC);
|
||||
after = rdtsc();
|
||||
before = rdtsc();
|
||||
usleep(USECS_PER_SEC);
|
||||
after = rdtsc();
|
||||
|
||||
rdtsc_per_sec = after - before;
|
||||
}
|
||||
rdtsc_per_sec = after - before;
|
||||
}
|
||||
|
||||
double monotonic_seconds() {
|
||||
if (showme) {
|
||||
showme = false;
|
||||
}
|
||||
return (double) rdtsc() / (double) rdtsc_per_sec;
|
||||
}
|
||||
double monotonic_seconds()
|
||||
{
|
||||
if (showme)
|
||||
{
|
||||
showme = false;
|
||||
}
|
||||
|
||||
return (double) rdtsc() / (double) rdtsc_per_sec;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1312,8 +1312,8 @@ int adat_priv_set_cmd(RIG *pRig, char *pcCmd, int nCmdKind)
|
|||
{
|
||||
adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
||||
|
||||
memset( pPriv->acCmd, 0, ADAT_PRIV_DATA_CMD_LENGTH + 1 );
|
||||
snprintf(pPriv->acCmd,ADAT_PRIV_DATA_CMD_LENGTH+1,"%s",pcCmd );
|
||||
memset(pPriv->acCmd, 0, ADAT_PRIV_DATA_CMD_LENGTH + 1);
|
||||
snprintf(pPriv->acCmd, ADAT_PRIV_DATA_CMD_LENGTH + 1, "%s", pcCmd);
|
||||
pPriv->nCmdKind = nCmdKind;
|
||||
}
|
||||
|
||||
|
@ -1351,8 +1351,8 @@ int adat_priv_set_result(RIG *pRig, char *pcResult)
|
|||
{
|
||||
adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
||||
|
||||
memset( pPriv->acResult, 0, ADAT_PRIV_DATA_RESULT_LENGTH + 1 );
|
||||
snprintf(pPriv->acResult,ADAT_PRIV_DATA_RESULT_LENGTH+1,"%s",pcResult );
|
||||
memset(pPriv->acResult, 0, ADAT_PRIV_DATA_RESULT_LENGTH + 1);
|
||||
snprintf(pPriv->acResult, ADAT_PRIV_DATA_RESULT_LENGTH + 1, "%s", pcResult);
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"*** ADAT: %d pPriv->acResult = \"%s\"\n",
|
||||
|
@ -1392,7 +1392,7 @@ int adat_priv_clear_result(RIG *pRig)
|
|||
else
|
||||
{
|
||||
adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
||||
memset( pPriv->acResult, 0, ADAT_PRIV_DATA_RESULT_LENGTH + 1 );
|
||||
memset(pPriv->acResult, 0, ADAT_PRIV_DATA_RESULT_LENGTH + 1);
|
||||
}
|
||||
|
||||
// Done !
|
||||
|
@ -1631,8 +1631,9 @@ int adat_cmd_fn_get_callsign(RIG *pRig)
|
|||
|
||||
if (nRC == RIG_OK)
|
||||
{
|
||||
memset( pPriv->acCallsign, 0, ADAT_PRIV_DATA_CALLSIGN_LENGTH + 1 );
|
||||
snprintf(pPriv->acCallsign,ADAT_PRIV_DATA_CALLSIGN_LENGTH+1,"%s",pPriv->acResult );
|
||||
memset(pPriv->acCallsign, 0, ADAT_PRIV_DATA_CALLSIGN_LENGTH + 1);
|
||||
snprintf(pPriv->acCallsign, ADAT_PRIV_DATA_CALLSIGN_LENGTH + 1, "%s",
|
||||
pPriv->acResult);
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"*** ADAT: %d pPriv->acCallsign = \"%s\"\n",
|
||||
|
@ -1684,8 +1685,9 @@ int adat_cmd_fn_get_serial_nr(RIG *pRig)
|
|||
|
||||
if (nRC == RIG_OK)
|
||||
{
|
||||
memset( pPriv->acSerialNr, 0, ADAT_PRIV_DATA_SERIALNR_LENGTH + 1 );
|
||||
snprintf(pPriv->acSerialNr,ADAT_PRIV_DATA_SERIALNR_LENGTH+1,"%s",pPriv->acResult );
|
||||
memset(pPriv->acSerialNr, 0, ADAT_PRIV_DATA_SERIALNR_LENGTH + 1);
|
||||
snprintf(pPriv->acSerialNr, ADAT_PRIV_DATA_SERIALNR_LENGTH + 1, "%s",
|
||||
pPriv->acResult);
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"*** ADAT: %d pPriv->acSerialNr = \"%s\"\n",
|
||||
|
@ -1737,8 +1739,9 @@ int adat_cmd_fn_get_fw_version(RIG *pRig)
|
|||
|
||||
if (nRC == RIG_OK)
|
||||
{
|
||||
memset( pPriv->acFWVersion, 0, ADAT_PRIV_DATA_FWVERSION_LENGTH + 1 );
|
||||
snprintf(pPriv->acFWVersion,ADAT_PRIV_DATA_FWVERSION_LENGTH+1,"%s",pPriv->acResult );
|
||||
memset(pPriv->acFWVersion, 0, ADAT_PRIV_DATA_FWVERSION_LENGTH + 1);
|
||||
snprintf(pPriv->acFWVersion, ADAT_PRIV_DATA_FWVERSION_LENGTH + 1, "%s",
|
||||
pPriv->acResult);
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"*** ADAT: %d pPriv->acFWVersion = \"%s\"\n",
|
||||
|
@ -1791,8 +1794,9 @@ int adat_cmd_fn_get_hw_version(RIG *pRig)
|
|||
|
||||
if (nRC == RIG_OK)
|
||||
{
|
||||
memset( pPriv->acHWVersion, 0, ADAT_PRIV_DATA_HWVERSION_LENGTH + 1 );
|
||||
snprintf(pPriv->acHWVersion,ADAT_PRIV_DATA_HWVERSION_LENGTH+1,"%s",pPriv->acResult );
|
||||
memset(pPriv->acHWVersion, 0, ADAT_PRIV_DATA_HWVERSION_LENGTH + 1);
|
||||
snprintf(pPriv->acHWVersion, ADAT_PRIV_DATA_HWVERSION_LENGTH + 1, "%s",
|
||||
pPriv->acResult);
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"*** ADAT: %d pPriv->acHWVersion = \"%s\"\n",
|
||||
|
@ -1844,8 +1848,9 @@ int adat_cmd_fn_get_gui_fw_version(RIG *pRig)
|
|||
|
||||
if (nRC == RIG_OK)
|
||||
{
|
||||
memset( pPriv->acGUIFWVersion, 0, ADAT_PRIV_DATA_GUIFWVERSION_LENGTH + 1 );
|
||||
snprintf(pPriv->acGUIFWVersion,ADAT_PRIV_DATA_GUIFWVERSION_LENGTH+1,"%s",pPriv->acResult );
|
||||
memset(pPriv->acGUIFWVersion, 0, ADAT_PRIV_DATA_GUIFWVERSION_LENGTH + 1);
|
||||
snprintf(pPriv->acGUIFWVersion, ADAT_PRIV_DATA_GUIFWVERSION_LENGTH + 1, "%s",
|
||||
pPriv->acResult);
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"*** ADAT: %d pPriv->acGUIFWVersion = \"%s\"\n",
|
||||
|
@ -1898,8 +1903,9 @@ int adat_cmd_fn_get_id_code(RIG *pRig)
|
|||
|
||||
if (nRC == RIG_OK)
|
||||
{
|
||||
memset( pPriv->acIDCode, 0, ADAT_PRIV_DATA_IDCODE_LENGTH + 1 );
|
||||
snprintf(pPriv->acIDCode,ADAT_PRIV_DATA_IDCODE_LENGTH+1,"%s",pPriv->acResult );
|
||||
memset(pPriv->acIDCode, 0, ADAT_PRIV_DATA_IDCODE_LENGTH + 1);
|
||||
snprintf(pPriv->acIDCode, ADAT_PRIV_DATA_IDCODE_LENGTH + 1, "%s",
|
||||
pPriv->acResult);
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"*** ADAT: %d pPriv->acIDCode = \"%s\"\n",
|
||||
|
@ -1951,8 +1957,9 @@ int adat_cmd_fn_get_options(RIG *pRig)
|
|||
|
||||
if (nRC == RIG_OK)
|
||||
{
|
||||
memset( pPriv->acOptions, 0, ADAT_PRIV_DATA_OPTIONS_LENGTH + 1 );
|
||||
snprintf(pPriv->acOptions,ADAT_PRIV_DATA_OPTIONS_LENGTH+1,"%s",pPriv->acResult );
|
||||
memset(pPriv->acOptions, 0, ADAT_PRIV_DATA_OPTIONS_LENGTH + 1);
|
||||
snprintf(pPriv->acOptions, ADAT_PRIV_DATA_OPTIONS_LENGTH + 1, "%s",
|
||||
pPriv->acResult);
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"*** ADAT: %d pPriv->acOptions = \"%s\"\n",
|
||||
|
@ -2056,7 +2063,7 @@ int adat_cmd_fn_set_mode(RIG *pRig)
|
|||
|
||||
memset(acBuf, 0, ADAT_BUFSZ + 1);
|
||||
|
||||
snprintf(acBuf,sizeof(acBuf),"%s%02d%s",
|
||||
snprintf(acBuf, sizeof(acBuf), "%s%02d%s",
|
||||
ADAT_CMD_DEF_STRING_SET_MODE,
|
||||
(int) pPriv->nADATMode,
|
||||
ADAT_EOM);
|
||||
|
@ -2173,7 +2180,7 @@ int adat_cmd_fn_set_freq(RIG *pRig)
|
|||
|
||||
memset(acBuf, 0, ADAT_BUFSZ + 1);
|
||||
|
||||
snprintf(acBuf,sizeof(acBuf),"%s%d%s",
|
||||
snprintf(acBuf, sizeof(acBuf), "%s%d%s",
|
||||
ADAT_CMD_DEF_STRING_SET_FREQ,
|
||||
(int) pPriv->nFreq,
|
||||
ADAT_EOM);
|
||||
|
@ -2229,7 +2236,7 @@ int adat_cmd_fn_set_vfo(RIG *pRig)
|
|||
|
||||
memset(acBuf, 0, ADAT_BUFSZ + 1);
|
||||
|
||||
snprintf(acBuf,sizeof(acBuf), ADAT_CMD_DEF_STRING_SWITCH_ON_VFO,
|
||||
snprintf(acBuf, sizeof(acBuf), ADAT_CMD_DEF_STRING_SWITCH_ON_VFO,
|
||||
(int) pPriv->nCurrentVFO,
|
||||
ADAT_EOM);
|
||||
|
||||
|
@ -2242,7 +2249,7 @@ int adat_cmd_fn_set_vfo(RIG *pRig)
|
|||
if (nRC == RIG_OK)
|
||||
{
|
||||
memset(acBuf, 0, ADAT_BUFSZ + 1);
|
||||
snprintf(acBuf,sizeof(acBuf),
|
||||
snprintf(acBuf, sizeof(acBuf),
|
||||
ADAT_CMD_DEF_STRING_SET_VFO_AS_MAIN_VFO,
|
||||
(int) pPriv->nCurrentVFO,
|
||||
ADAT_EOM);
|
||||
|
@ -2375,7 +2382,7 @@ int adat_cmd_fn_set_ptt(RIG *pRig)
|
|||
{
|
||||
char acBuf[ ADAT_BUFSZ + 1 ];
|
||||
memset(acBuf, 0, ADAT_BUFSZ + 1);
|
||||
snprintf(acBuf,sizeof(acBuf),ADAT_CMD_DEF_STRING_SET_PTT,
|
||||
snprintf(acBuf, sizeof(acBuf), ADAT_CMD_DEF_STRING_SET_PTT,
|
||||
pcPTTStr,
|
||||
ADAT_EOM);
|
||||
|
||||
|
@ -2490,8 +2497,8 @@ int adat_transaction(RIG *pRig,
|
|||
nRC = adat_receive(pRig, acBuf);
|
||||
}
|
||||
|
||||
memset( pPriv->acResult, 0, ADAT_PRIV_DATA_RESULT_LENGTH + 1 );
|
||||
snprintf(pPriv->acResult,ADAT_PRIV_DATA_RESULT_LENGTH+1,"%s",acBuf);
|
||||
memset(pPriv->acResult, 0, ADAT_PRIV_DATA_RESULT_LENGTH + 1);
|
||||
snprintf(pPriv->acResult, ADAT_PRIV_DATA_RESULT_LENGTH + 1, "%s", acBuf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2546,8 +2553,8 @@ int adat_init(RIG *pRig)
|
|||
{
|
||||
// Set Rig Priv data
|
||||
|
||||
memset( &gsADATPrivData, 0, sizeof( adat_priv_data_t ));
|
||||
pRig->state.priv = &gsADATPrivData;
|
||||
memset(&gsADATPrivData, 0, sizeof(adat_priv_data_t));
|
||||
pRig->state.priv = &gsADATPrivData;
|
||||
}
|
||||
|
||||
// Done !
|
||||
|
@ -2685,10 +2692,10 @@ const char *adat_get_info(RIG *pRig)
|
|||
|
||||
if (nRC == RIG_OK)
|
||||
{
|
||||
// cppcheck-suppress constVariablePointer
|
||||
// cppcheck-suppress constVariablePointer
|
||||
const adat_priv_data_ptr pPriv = (adat_priv_data_ptr) pRig->state.priv;
|
||||
|
||||
snprintf(acBuf,2048,
|
||||
snprintf(acBuf, 2048,
|
||||
"ADAT ADT-200A, Callsign: %s, S/N: %s, ID Code: %s, Options: %s, FW: %s, GUI FW: %s, HW: %s",
|
||||
pPriv->acCallsign,
|
||||
pPriv->acSerialNr,
|
||||
|
@ -3271,7 +3278,8 @@ int adat_set_conf(RIG *pRig, token_t token, const char *val)
|
|||
{
|
||||
case TOKEN_ADAT_PRODUCT_NAME:
|
||||
|
||||
snprintf(pPriv->acProductName,ADAT_PRIV_DATA_PRODUCTNAME_LENGTH+1,"%s",val );
|
||||
snprintf(pPriv->acProductName, ADAT_PRIV_DATA_PRODUCTNAME_LENGTH + 1, "%s",
|
||||
val);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -3316,10 +3324,15 @@ int adat_get_conf(RIG *pRig, token_t token, char *val)
|
|||
switch (token)
|
||||
{
|
||||
case TOKEN_ADAT_PRODUCT_NAME:
|
||||
if (strlen(pPriv->acProductName) > 0)
|
||||
strcpy(val, pPriv->acProductName);
|
||||
else
|
||||
strcpy(val,"Unknown product");
|
||||
if (strlen(pPriv->acProductName) > 0)
|
||||
{
|
||||
strcpy(val, pPriv->acProductName);
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(val, "Unknown product");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -610,7 +610,7 @@ int adat_power2mW(RIG *, unsigned int *, float, freq_t, rmode_t);
|
|||
|
||||
int adat_get_powerstat(RIG *, powerstat_t *);
|
||||
|
||||
extern const struct rig_caps adt_200a_caps;
|
||||
extern struct rig_caps adt_200a_caps;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// END OF FILE
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
// ADT-200A HAMLIB CAPS / DESCRIPTION
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const struct rig_caps adt_200a_caps =
|
||||
struct rig_caps adt_200a_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_ADT_200A),
|
||||
.model_name = "ADT-200A",
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
#define BACKEND_VER "20200323"
|
||||
|
||||
extern const struct rig_caps dx77_caps;
|
||||
extern const struct rig_caps dxsr8_caps;
|
||||
extern struct rig_caps dx77_caps;
|
||||
extern struct rig_caps dxsr8_caps;
|
||||
|
||||
#define BUFSZ 32
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ int dx77_get_mem(RIG *rig, vfo_t vfo, int *ch);
|
|||
* - up/down
|
||||
* - scan
|
||||
*/
|
||||
const struct rig_caps dx77_caps =
|
||||
struct rig_caps dx77_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_DX77),
|
||||
.model_name = "DX-77",
|
||||
|
@ -1260,7 +1260,7 @@ int dx77_set_parm(RIG *rig, setting_t parm, value_t val)
|
|||
*/
|
||||
int dx77_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
|
||||
{
|
||||
const struct rig_caps *caps;
|
||||
struct rig_caps *caps;
|
||||
unsigned char tonebuf[BUFSZ];
|
||||
int i;
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ int dxsr8_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt);
|
|||
* https://yo5ptd.wordpress.com/2017/02/12/alinco-dx-sr8/
|
||||
* for a partially documented protocol
|
||||
*/
|
||||
const struct rig_caps dxsr8_caps =
|
||||
struct rig_caps dxsr8_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_DXSR8),
|
||||
.model_name = "DX-SR8",
|
||||
|
|
|
@ -46,7 +46,8 @@
|
|||
// ---------------------------------------------------------------------------
|
||||
|
||||
#include "anytone.h"
|
||||
int anytone_transaction(RIG *rig, unsigned char *cmd, int cmd_len, unsigned char *reply, int reply_len, int expected_len);
|
||||
int anytone_transaction(RIG *rig, unsigned char *cmd, int cmd_len,
|
||||
unsigned char *reply, int reply_len, int expected_len);
|
||||
|
||||
DECLARE_INITRIG_BACKEND(anytone)
|
||||
{
|
||||
|
@ -116,7 +117,7 @@ void *anytone_thread(void *vrig)
|
|||
|
||||
write_block(&rig->state.rigport, (unsigned char *)c, strlen(c));
|
||||
char buf[32];
|
||||
read_block(&rig->state.rigport, (unsigned char*)buf, 22);
|
||||
read_block(&rig->state.rigport, (unsigned char *)buf, 22);
|
||||
|
||||
if (rig_need_debug(RIG_DEBUG_CACHE) == 0)
|
||||
{
|
||||
|
@ -176,7 +177,8 @@ int anytone_receive(RIG *rig, unsigned char *buf, int buf_len, int expected)
|
|||
// ---------------------------------------------------------------------------
|
||||
// anytone_transaction
|
||||
// ---------------------------------------------------------------------------
|
||||
int anytone_transaction(RIG *rig, unsigned char *cmd, int cmd_len, unsigned char *reply, int reply_len, int expected_len)
|
||||
int anytone_transaction(RIG *rig, unsigned char *cmd, int cmd_len,
|
||||
unsigned char *reply, int reply_len, int expected_len)
|
||||
{
|
||||
int retval = RIG_OK;
|
||||
//anytone_priv_data_t *p = rig->state.priv;
|
||||
|
@ -258,7 +260,7 @@ int anytone_open(RIG *rig)
|
|||
|
||||
ENTERFUNC;
|
||||
|
||||
unsigned char cmd[] = { 0x2B,0x41,0x44,0x41,0x54,0x41,0x3A,0x30,0x30,0x2C,0x30,0x30,0x31,0x0d,0x0a,'a',0x0d,0x0a };
|
||||
unsigned char cmd[] = { 0x2B, 0x41, 0x44, 0x41, 0x54, 0x41, 0x3A, 0x30, 0x30, 0x2C, 0x30, 0x30, 0x31, 0x0d, 0x0a, 'a', 0x0d, 0x0a };
|
||||
write_block(&rig->state.rigport, cmd, sizeof(cmd));
|
||||
hl_usleep(500 * 1000);
|
||||
char cmd2[64];
|
||||
|
@ -266,7 +268,8 @@ int anytone_open(RIG *rig)
|
|||
write_block(&rig->state.rigport, (unsigned char *)cmd2, strlen(cmd2));
|
||||
SNPRINTF(cmd2, sizeof(cmd2), "+ADATA:00,000\r\n");
|
||||
unsigned char reply[512];
|
||||
anytone_transaction(rig, (unsigned char*)cmd2, strlen(cmd2), reply, sizeof(reply), strlen(cmd2));
|
||||
anytone_transaction(rig, (unsigned char *)cmd2, strlen(cmd2), reply,
|
||||
sizeof(reply), strlen(cmd2));
|
||||
|
||||
pthread_t id;
|
||||
// will start the keep alive
|
||||
|
@ -291,7 +294,7 @@ int anytone_close(RIG *rig)
|
|||
|
||||
ENTERFUNC;
|
||||
char *cmd = "+ADATA:00,000\r\n";
|
||||
anytone_transaction(rig, (unsigned char*)cmd, strlen(cmd), NULL, 0, 0);
|
||||
anytone_transaction(rig, (unsigned char *)cmd, strlen(cmd), NULL, 0, 0);
|
||||
|
||||
RETURNFUNC(retval);
|
||||
}
|
||||
|
@ -309,10 +312,11 @@ int anytone_get_vfo(RIG *rig, vfo_t *vfo)
|
|||
|
||||
const anytone_priv_data_ptr p = (anytone_priv_data_ptr) rig->state.priv;
|
||||
unsigned char reply[512];
|
||||
unsigned char cmd[] = { 0x2b,0x41,0x44,0x41,0x54,0x41,0x3a,0x30,0x30,0x2c,0x30,0x30,0x36,0x0d,0x0a,0x04,0x05,0x00,0x00,0x00,0x00,0x0d,0x0a };
|
||||
unsigned char cmd[] = { 0x2b, 0x41, 0x44, 0x41, 0x54, 0x41, 0x3a, 0x30, 0x30, 0x2c, 0x30, 0x30, 0x36, 0x0d, 0x0a, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x0a };
|
||||
anytone_transaction(rig, cmd, sizeof(cmd), reply, sizeof(reply), 114);
|
||||
if (reply[113] == 0x9b) *vfo = RIG_VFO_A;
|
||||
else if (reply[113] == 0x9c) *vfo = RIG_VFO_B;
|
||||
|
||||
if (reply[113] == 0x9b) { *vfo = RIG_VFO_A; }
|
||||
else if (reply[113] == 0x9c) { *vfo = RIG_VFO_B; }
|
||||
else
|
||||
{
|
||||
*vfo = RIG_VFO_A; // default to VFOA
|
||||
|
@ -357,10 +361,11 @@ int anytone_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
|
|||
ENTERFUNC;
|
||||
|
||||
//char buf[8] = { 0x41, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x06 };
|
||||
unsigned char ptton[] = { 0x2B,0x41,0x44,0x41,0x54,0x41,0x3A,0x30,0x30,0x2C,0x30,0x30,0x31,0x0d,0x0a,0x61,0x0d,0x0a };
|
||||
unsigned char pttoff[] = { 0x2B,0x41,0x44,0x41,0x54,0x41,0x3A,0x30,0x30,0x2C,0x30,0x32,0x33,0x0d,0x0a,0x56,0x0d,0x0a };
|
||||
unsigned char ptton[] = { 0x2B, 0x41, 0x44, 0x41, 0x54, 0x41, 0x3A, 0x30, 0x30, 0x2C, 0x30, 0x30, 0x31, 0x0d, 0x0a, 0x61, 0x0d, 0x0a };
|
||||
unsigned char pttoff[] = { 0x2B, 0x41, 0x44, 0x41, 0x54, 0x41, 0x3A, 0x30, 0x30, 0x2C, 0x30, 0x32, 0x33, 0x0d, 0x0a, 0x56, 0x0d, 0x0a };
|
||||
void *pttcmd = ptton;
|
||||
if (!ptt) pttcmd = pttoff;
|
||||
|
||||
if (!ptt) { pttcmd = pttoff; }
|
||||
|
||||
//if (!ptt) { cmd = " (unsigned char*)+ADATA:00,023\r\nV\r\n"; }
|
||||
|
||||
|
@ -409,6 +414,7 @@ int anytone_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
}
|
||||
}
|
||||
while (retval != 138 && --retry > 0);
|
||||
|
||||
MUTEX_UNLOCK(p->priv.mutex);
|
||||
|
||||
return RIG_OK;
|
||||
|
@ -417,19 +423,25 @@ int anytone_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
int anytone_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
||||
{
|
||||
char cmd[64];
|
||||
|
||||
if (vfo == RIG_VFO_A)
|
||||
snprintf(cmd, sizeof(cmd), "ADATA:00,005\r\n%c%c%c%c\r\n", 2, 0, 0, 0);
|
||||
{
|
||||
snprintf(cmd, sizeof(cmd), "ADATA:00,005\r\n%c%c%c%c\r\n", 2, 0, 0, 0);
|
||||
}
|
||||
else
|
||||
snprintf(cmd, sizeof(cmd), "ADATA:00,005\r\n%c%c%c%c\r\n", 1, 0, 0, 0);
|
||||
{
|
||||
snprintf(cmd, sizeof(cmd), "ADATA:00,005\r\n%c%c%c%c\r\n", 1, 0, 0, 0);
|
||||
}
|
||||
|
||||
MUTEX_LOCK(p->priv.mutex);
|
||||
rig_flush(&rig->state.rigport);
|
||||
write_block(&rig->state.rigport, (unsigned char*) cmd, 20);
|
||||
write_block(&rig->state.rigport, (unsigned char *) cmd, 20);
|
||||
unsigned char backend[] = { 0x2f, 0x03, 0x00, 0xff, 0xff, 0xff, 0xff, 0x15, 0x50, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x09, 0x00, 0x00, 0x0d, 0x0a};
|
||||
snprintf(cmd, sizeof(cmd), "ADATA:00,023\r\n");
|
||||
int bytes = strlen(cmd) + sizeof(backend);
|
||||
memcpy(&cmd[15], backend, sizeof(backend));
|
||||
hl_usleep(10*1000);
|
||||
write_block(&rig->state.rigport, (unsigned char*)cmd, bytes);
|
||||
hl_usleep(10 * 1000);
|
||||
write_block(&rig->state.rigport, (unsigned char *)cmd, bytes);
|
||||
MUTEX_UNLOCK(p->priv.mutex);
|
||||
|
||||
return -RIG_ENIMPL;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#define ANYTONE_RESPSZ 64
|
||||
|
||||
extern const struct rig_caps anytone_d578_caps;
|
||||
extern struct rig_caps anytone_d578_caps;
|
||||
|
||||
#ifdef PTHREAD
|
||||
#include <pthread.h>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define D578_VFO (RIG_VFO_A|RIG_VFO_B)
|
||||
#define D578_MODES (RIG_MODE_USB|RIG_MODE_AM)
|
||||
|
||||
const struct rig_caps anytone_d578_caps =
|
||||
struct rig_caps anytone_d578_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_ATD578UVIII),
|
||||
.model_name = "D578A",
|
||||
|
|
|
@ -64,16 +64,16 @@ int aor_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only);
|
|||
int aor_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan);
|
||||
int aor_get_chan_all_cb (RIG * rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t);
|
||||
|
||||
extern const struct rig_caps ar2700_caps;
|
||||
extern const struct rig_caps ar8200_caps;
|
||||
extern const struct rig_caps ar8000_caps;
|
||||
extern const struct rig_caps ar8600_caps;
|
||||
extern const struct rig_caps ar5000_caps;
|
||||
extern const struct rig_caps ar3000a_caps;
|
||||
extern const struct rig_caps ar7030_caps;
|
||||
extern const struct rig_caps ar3030_caps;
|
||||
extern const struct rig_caps ar5000a_caps;
|
||||
extern const struct rig_caps ar7030p_caps;
|
||||
extern const struct rig_caps sr2200_caps;
|
||||
extern struct rig_caps ar2700_caps;
|
||||
extern struct rig_caps ar8200_caps;
|
||||
extern struct rig_caps ar8000_caps;
|
||||
extern struct rig_caps ar8600_caps;
|
||||
extern struct rig_caps ar5000_caps;
|
||||
extern struct rig_caps ar3000a_caps;
|
||||
extern struct rig_caps ar7030_caps;
|
||||
extern struct rig_caps ar3030_caps;
|
||||
extern struct rig_caps ar5000a_caps;
|
||||
extern struct rig_caps ar7030p_caps;
|
||||
extern struct rig_caps sr2200_caps;
|
||||
|
||||
#endif /* _AOR_H */
|
||||
|
|
|
@ -80,7 +80,7 @@ static const struct aor_priv_caps ar2700_priv_caps =
|
|||
* part of info from http://www.aoruk.com/2700.htm
|
||||
* Interface unit: CU-8232 (or equivalent)
|
||||
*/
|
||||
const struct rig_caps ar2700_caps =
|
||||
struct rig_caps ar2700_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_AR2700),
|
||||
.model_name = "AR2700",
|
||||
|
|
|
@ -62,7 +62,7 @@ static int ar3k_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val);
|
|||
* TODO:
|
||||
* set_channel, get_channel, set_func MUTE,SQL, get_dcd, ...
|
||||
*/
|
||||
const struct rig_caps ar3000a_caps =
|
||||
struct rig_caps ar3000a_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_AR3000A),
|
||||
.model_name = "AR3000A",
|
||||
|
|
|
@ -93,7 +93,7 @@ struct ar3030_priv_data
|
|||
*
|
||||
* ar3030 rig capabilities.
|
||||
*/
|
||||
const struct rig_caps ar3030_caps =
|
||||
struct rig_caps ar3030_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_AR3030),
|
||||
.model_name = "AR3030",
|
||||
|
@ -356,7 +356,8 @@ int ar3030_set_vfo(RIG *rig, vfo_t vfo)
|
|||
|
||||
int ar3030_get_vfo(RIG *rig, vfo_t *vfo)
|
||||
{
|
||||
const struct ar3030_priv_data *priv = (struct ar3030_priv_data *)rig->state.priv;
|
||||
const struct ar3030_priv_data *priv = (struct ar3030_priv_data *)
|
||||
rig->state.priv;
|
||||
|
||||
*vfo = priv->curr_vfo;
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ static const struct aor_priv_caps ar5k_priv_caps =
|
|||
*
|
||||
* TODO: retrieve BW info, and rest of commands
|
||||
*/
|
||||
const struct rig_caps ar5000_caps =
|
||||
struct rig_caps ar5000_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_AR5000),
|
||||
.model_name = "AR5000",
|
||||
|
@ -245,7 +245,7 @@ const struct rig_caps ar5000_caps =
|
|||
*
|
||||
* TODO: retrieve BW info, and rest of commands
|
||||
*/
|
||||
const struct rig_caps ar5000a_caps =
|
||||
struct rig_caps ar5000a_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_AR5000A),
|
||||
.model_name = "AR5000A",
|
||||
|
|
|
@ -190,7 +190,8 @@ static void Execute_Routine_2_1(RIG *rig, char mp, char ad, int numSteps)
|
|||
}
|
||||
#endif
|
||||
// Routine 3 Set passband Setup all IF parameters from filter, pbsval and bfoval bytes.
|
||||
static void Execute_Routine_3_1(RIG *rig, char mp, char ad, unsigned int numSteps)
|
||||
static void Execute_Routine_3_1(RIG *rig, char mp, char ad,
|
||||
unsigned int numSteps)
|
||||
{
|
||||
setLock(rig, 1); //Set Lock Level
|
||||
setMemPtr(rig, mp, ad); //page, address
|
||||
|
@ -772,7 +773,7 @@ static int ar7030_reset(RIG *rig, reset_t reset)
|
|||
|
||||
|
||||
|
||||
const struct rig_caps ar7030_caps =
|
||||
struct rig_caps ar7030_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_AR7030),
|
||||
.model_name = "AR7030",
|
||||
|
|
|
@ -333,7 +333,7 @@ static int ar7030p_cleanup(RIG *rig)
|
|||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (priv == NULL) return RIG_OK;
|
||||
if (priv == NULL) { return RIG_OK; }
|
||||
|
||||
for (i = 0; i < NB_CHAN; i++)
|
||||
{
|
||||
|
@ -483,7 +483,7 @@ static int ar7030p_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
|
||||
if (RIG_OK == rc)
|
||||
{
|
||||
const struct rig_caps *caps = rig->caps;
|
||||
struct rig_caps *caps = rig->caps;
|
||||
|
||||
if ((caps->rx_range_list1[ 0 ].endf > freq) &&
|
||||
(caps->rx_range_list1[ 0 ].startf < freq))
|
||||
|
@ -1264,7 +1264,8 @@ static int ar7030p_set_vfo(RIG *rig, vfo_t vfo)
|
|||
static int ar7030p_get_vfo(RIG *rig, vfo_t *vfo)
|
||||
{
|
||||
int rc = RIG_OK;
|
||||
struct ar7030p_priv_data const *priv = (struct ar7030p_priv_data *) rig->state.priv;
|
||||
struct ar7030p_priv_data const *priv = (struct ar7030p_priv_data *)
|
||||
rig->state.priv;
|
||||
|
||||
assert(NULL != vfo);
|
||||
|
||||
|
@ -1348,7 +1349,8 @@ static int ar7030p_get_mem(RIG *rig, vfo_t vfo, int *ch)
|
|||
{
|
||||
int rc = RIG_OK;
|
||||
|
||||
struct ar7030p_priv_data const *priv = (struct ar7030p_priv_data *) rig->state.priv;
|
||||
struct ar7030p_priv_data const *priv = (struct ar7030p_priv_data *)
|
||||
rig->state.priv;
|
||||
const channel_t *curr = priv->curr;
|
||||
|
||||
assert(NULL != ch);
|
||||
|
@ -1648,7 +1650,8 @@ static int ar7030p_get_channel(RIG *rig, vfo_t vfo, channel_t *chan,
|
|||
unsigned int f;
|
||||
unsigned char *p = NULL;
|
||||
int ch;
|
||||
const struct ar7030p_priv_data *priv = (struct ar7030p_priv_data *)rig->state.priv;
|
||||
const struct ar7030p_priv_data *priv = (struct ar7030p_priv_data *)
|
||||
rig->state.priv;
|
||||
const channel_t *curr = priv->curr;
|
||||
|
||||
assert(NULL != chan);
|
||||
|
@ -1770,7 +1773,7 @@ static int ar7030p_get_channel(RIG *rig, vfo_t vfo, channel_t *chan,
|
|||
return (rc);
|
||||
}
|
||||
|
||||
const struct rig_caps ar7030p_caps =
|
||||
struct rig_caps ar7030p_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_AR7030P),
|
||||
.model_name = "AR7030 Plus",
|
||||
|
|
|
@ -60,7 +60,7 @@ static const struct aor_priv_caps ar8000_priv_caps =
|
|||
*
|
||||
* part of info from http://www.aoruk.com/8000.htm
|
||||
*/
|
||||
const struct rig_caps ar8000_caps =
|
||||
struct rig_caps ar8000_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_AR8000),
|
||||
.model_name = "AR8000",
|
||||
|
|
|
@ -84,7 +84,7 @@ static const struct aor_priv_caps ar8k_priv_caps =
|
|||
*
|
||||
* part of info from http://www.aoruk.com/8200.htm
|
||||
*/
|
||||
const struct rig_caps ar8200_caps =
|
||||
struct rig_caps ar8200_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_AR8200),
|
||||
.model_name = "AR8200",
|
||||
|
|
|
@ -86,7 +86,7 @@ static const struct aor_priv_caps ar8600_priv_caps =
|
|||
*
|
||||
* part of info from http://www.aoruk.com/8600.htm
|
||||
*/
|
||||
const struct rig_caps ar8600_caps =
|
||||
struct rig_caps ar8600_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_AR8600),
|
||||
.model_name = "AR8600",
|
||||
|
|
|
@ -119,7 +119,7 @@ static const struct aor_priv_caps sr2200_priv_caps =
|
|||
*
|
||||
* TODO: retrieve BW info, and rest of commands
|
||||
*/
|
||||
const struct rig_caps sr2200_caps =
|
||||
struct rig_caps sr2200_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_SR2200),
|
||||
.model_name = "SR2200",
|
||||
|
|
|
@ -94,7 +94,7 @@ static int barrett4050_open(RIG *rig)
|
|||
RETURNFUNC(RIG_OK);
|
||||
}
|
||||
|
||||
const struct rig_caps barrett4050_caps =
|
||||
struct rig_caps barrett4050_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_BARRETT_4050),
|
||||
.model_name = "4050",
|
||||
|
|
|
@ -66,7 +66,7 @@ static struct chan_map_s chan_map[] =
|
|||
{ 28.0, 30.0, 9}
|
||||
};
|
||||
|
||||
const struct rig_caps barrett950_caps =
|
||||
struct rig_caps barrett950_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_BARRETT_950),
|
||||
.model_name = "950",
|
||||
|
@ -164,7 +164,9 @@ int barrett950_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
|
||||
for (i = 0; i < 10; ++i)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: Mhz=%lg, lo=%lg, hi=%lg\n", __func__, freq_MHz, chan_map[i].lo, chan_map[i].hi);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: Mhz=%lg, lo=%lg, hi=%lg\n", __func__,
|
||||
freq_MHz, chan_map[i].lo, chan_map[i].hi);
|
||||
|
||||
if (freq_MHz >= chan_map[i].lo && freq_MHz <= chan_map[i].hi)
|
||||
{
|
||||
int channel_base = priv->channel_base;
|
||||
|
|
|
@ -683,11 +683,13 @@ int barrett_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
|
||||
switch (level)
|
||||
{
|
||||
case RIG_LEVEL_AGC:
|
||||
sprintf(cmd_buf,"EG%c%s", val.i==0?'N':'H' , EOM);
|
||||
break;
|
||||
default: return -RIG_ENIMPL;
|
||||
case RIG_LEVEL_AGC:
|
||||
sprintf(cmd_buf, "EG%c%s", val.i == 0 ? 'N' : 'H', EOM);
|
||||
break;
|
||||
|
||||
default: return -RIG_ENIMPL;
|
||||
}
|
||||
|
||||
rig_flush(&rs->rigport);
|
||||
retval = write_block(&rs->rigport, (unsigned char *) cmd_buf, strlen(cmd_buf));
|
||||
|
||||
|
@ -695,6 +697,7 @@ int barrett_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
{
|
||||
return retval;
|
||||
}
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -756,7 +759,7 @@ int barrett_open(RIG *rig)
|
|||
}
|
||||
|
||||
|
||||
const struct rig_caps barrett_caps =
|
||||
struct rig_caps barrett_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_BARRETT_2050),
|
||||
.model_name = "2050",
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
// RET_LEN is # of max channels times the per-channel response length
|
||||
#define BARRETT_RET_LEN 24*1000
|
||||
|
||||
extern const struct rig_caps barrett_caps;
|
||||
extern const struct rig_caps barrett950_caps;
|
||||
extern const struct rig_caps barrett4050_caps;
|
||||
extern struct rig_caps barrett_caps;
|
||||
extern struct rig_caps barrett950_caps;
|
||||
extern struct rig_caps barrett4050_caps;
|
||||
|
||||
struct barrett_priv_data {
|
||||
char cmd_str[BARRETT_DATA_LEN]; /* command string buffer */
|
||||
|
|
|
@ -410,7 +410,7 @@ int codan_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
|
|||
|
||||
|
||||
|
||||
const struct rig_caps envoy_caps =
|
||||
struct rig_caps envoy_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_CODAN_ENVOY),
|
||||
.model_name = "Envoy",
|
||||
|
@ -475,7 +475,7 @@ const struct rig_caps envoy_caps =
|
|||
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
|
||||
};
|
||||
|
||||
const struct rig_caps ngs_caps =
|
||||
struct rig_caps ngs_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_CODAN_NGT),
|
||||
.model_name = "NGT",
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
// But that would 9999*41 or 406KB so didn't do that right now
|
||||
#define CODAN_DATA_LEN 64
|
||||
|
||||
extern const struct rig_caps envoy_caps;
|
||||
extern const struct rig_caps ngs_caps;
|
||||
extern struct rig_caps envoy_caps;
|
||||
extern struct rig_caps ngs_caps;
|
||||
|
||||
struct codan_priv_data {
|
||||
char cmd_str[CODAN_DATA_LEN]; /* command string buffer */
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "hamlib/rig.h"
|
||||
|
||||
extern const struct rig_caps dra818u_caps;
|
||||
extern const struct rig_caps dra818v_caps;
|
||||
extern struct rig_caps dra818u_caps;
|
||||
extern struct rig_caps dra818v_caps;
|
||||
|
||||
#endif /* _DORJI_H */
|
||||
|
|
|
@ -519,7 +519,7 @@ int dra818_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
|
|||
return RIG_OK;
|
||||
}
|
||||
|
||||
const struct rig_caps dra818u_caps =
|
||||
struct rig_caps dra818u_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_DORJI_DRA818U),
|
||||
.model_name = "DRA818U",
|
||||
|
@ -623,7 +623,7 @@ const struct rig_caps dra818u_caps =
|
|||
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
|
||||
};
|
||||
|
||||
const struct rig_caps dra818v_caps =
|
||||
struct rig_caps dra818v_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_DORJI_DRA818V),
|
||||
.model_name = "DRA818V",
|
||||
|
|
|
@ -53,8 +53,8 @@ int drake_set_powerstat (RIG * rig, powerstat_t status);
|
|||
int drake_get_powerstat (RIG * rig, powerstat_t *status);
|
||||
const char *drake_get_info(RIG *rig);
|
||||
|
||||
extern const struct rig_caps r8a_caps;
|
||||
extern const struct rig_caps r8b_caps;
|
||||
extern struct rig_caps r8a_caps;
|
||||
extern struct rig_caps r8b_caps;
|
||||
|
||||
#endif /* _DRAKE_H */
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
const struct rig_caps r8a_caps =
|
||||
struct rig_caps r8a_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_DKR8A),
|
||||
.model_name = "R-8A",
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
const struct rig_caps r8b_caps =
|
||||
struct rig_caps r8b_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_DKR8B),
|
||||
.model_name = "R-8B",
|
||||
|
|
|
@ -257,7 +257,7 @@ static int aclog_transaction(RIG *rig, char *cmd, char *value,
|
|||
|
||||
ENTERFUNC;
|
||||
ELAPSED1;
|
||||
strcpy(xml,"UNKNOWN");
|
||||
strcpy(xml, "UNKNOWN");
|
||||
|
||||
set_transaction_active(rig);
|
||||
|
||||
|
@ -710,10 +710,12 @@ static int aclog_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
}
|
||||
|
||||
#if 0
|
||||
|
||||
if (vfo == RIG_VFO_CURR)
|
||||
{
|
||||
vfo = rig->state.current_vfo;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SNPRINTF(cmd, sizeof(cmd),
|
||||
|
@ -933,7 +935,7 @@ static int aclog_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
|
|||
}
|
||||
|
||||
|
||||
const struct rig_caps aclog_caps =
|
||||
struct rig_caps aclog_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_ACLOG),
|
||||
.model_name = "ACLog",
|
||||
|
|
|
@ -143,7 +143,7 @@ Also a way to display faults (there are commands)
|
|||
static int dummy_amp_get_freq(AMP *amp, freq_t *freq)
|
||||
{
|
||||
const struct dummy_amp_priv_data *priv = (struct dummy_amp_priv_data *)
|
||||
amp->state.priv;
|
||||
amp->state.priv;
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
*freq = priv->freq;
|
||||
return RIG_OK;
|
||||
|
@ -267,7 +267,7 @@ static int dummy_amp_set_powerstat(AMP *amp, powerstat_t status)
|
|||
static int dummy_amp_get_powerstat(AMP *amp, powerstat_t *status)
|
||||
{
|
||||
const struct dummy_amp_priv_data *priv = (struct dummy_amp_priv_data *)
|
||||
amp->state.priv;
|
||||
amp->state.priv;
|
||||
|
||||
*status = priv->powerstat;
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
|
|
@ -451,7 +451,9 @@ static int dummy_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
rig_debug(RIG_DEBUG_ERR, "%s: rig is NULL!!!\n", __func__);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
||||
priv = (struct dummy_priv_data *)rig->state.priv;
|
||||
|
||||
if (priv == NULL)
|
||||
{
|
||||
RETURNFUNC(-RIG_EINTERNAL);
|
||||
|
@ -1613,9 +1615,10 @@ static int dummy_set_parm(RIG *rig, setting_t parm, value_t val)
|
|||
{
|
||||
SNPRINTF(pstr, sizeof(pstr), "%f", val.f);
|
||||
}
|
||||
|
||||
if (RIG_PARM_IS_STRING(parm))
|
||||
{
|
||||
strcpy(pstr,val.cs);
|
||||
strcpy(pstr, val.cs);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2382,10 +2385,10 @@ struct rig_caps dummy_caps =
|
|||
.has_get_parm = DUMMY_PARM,
|
||||
.has_set_parm = RIG_PARM_SET(DUMMY_PARM),
|
||||
.level_gran = {
|
||||
[LVL_RF] = { .min = { .f = 0 }, .max = { .f = 1.0f }, .step = { .f = 1.0f/255.0f } },
|
||||
[LVL_RFPOWER] = { .min = { .f = .05f }, .max = { .f = 1 }, .step = { .f = 1.0f/511.0f } },
|
||||
[LVL_RFPOWER_METER] = { .min = { .f = .0f }, .max = { .f = 1 }, .step = { .f = 1.0f/255.0f } },
|
||||
[LVL_RFPOWER_METER_WATTS] = { .min = { .f = .0f }, .max = { .f = 100 }, .step = { .f = 1.0f/255.0f } },
|
||||
[LVL_RF] = { .min = { .f = 0 }, .max = { .f = 1.0f }, .step = { .f = 1.0f / 255.0f } },
|
||||
[LVL_RFPOWER] = { .min = { .f = .05f }, .max = { .f = 1 }, .step = { .f = 1.0f / 511.0f } },
|
||||
[LVL_RFPOWER_METER] = { .min = { .f = .0f }, .max = { .f = 1 }, .step = { .f = 1.0f / 255.0f } },
|
||||
[LVL_RFPOWER_METER_WATTS] = { .min = { .f = .0f }, .max = { .f = 100 }, .step = { .f = 1.0f / 255.0f } },
|
||||
[LVL_CWPITCH] = { .step = { .i = 10 } },
|
||||
[LVL_SPECTRUM_SPEED] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
|
||||
[LVL_SPECTRUM_REF] = {.min = {.f = -30.0f}, .max = {.f = 10.0f}, .step = {.f = 0.5f}},
|
||||
|
|
|
@ -42,11 +42,11 @@
|
|||
extern struct rig_caps dummy_caps;
|
||||
extern struct rig_caps dummy_no_vfo_caps;
|
||||
extern struct rig_caps netrigctl_caps;
|
||||
extern const struct rig_caps flrig_caps;
|
||||
extern const struct rig_caps trxmanager_caps;
|
||||
extern const struct rig_caps tci1x_caps;
|
||||
extern const struct rig_caps aclog_caps;
|
||||
extern const struct rig_caps sdrsharp_caps;
|
||||
extern struct rig_caps flrig_caps;
|
||||
extern struct rig_caps trxmanager_caps;
|
||||
extern struct rig_caps tci1x_caps;
|
||||
extern struct rig_caps aclog_caps;
|
||||
extern struct rig_caps sdrsharp_caps;
|
||||
extern struct rig_caps quisk_caps;
|
||||
|
||||
int netrigctl_get_vfo_mode(RIG *);
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
RIG_MODE_PKTLSB | RIG_MODE_PKTUSB |\
|
||||
RIG_MODE_SSB | RIG_MODE_LSB | RIG_MODE_USB |\
|
||||
RIG_MODE_FM | RIG_MODE_WFM | RIG_MODE_FMN | RIG_MODE_PKTFM |\
|
||||
RIG_MODE_C4FM)
|
||||
RIG_MODE_C4FM | RIG_MODE_DSTAR)
|
||||
|
||||
#define FLRIG_LEVELS (RIG_LEVEL_AF | RIG_LEVEL_RF | RIG_LEVEL_MICGAIN | RIG_LEVEL_STRENGTH | RIG_LEVEL_RFPOWER_METER | RIG_LEVEL_RFPOWER_METER_WATTS | RIG_LEVEL_RFPOWER | RIG_LEVEL_SWR)
|
||||
|
||||
|
@ -138,12 +138,12 @@ static const struct confparams flrig_ext_parms[] =
|
|||
{ RIG_CONF_END, NULL, }
|
||||
};
|
||||
|
||||
const struct rig_caps flrig_caps =
|
||||
struct rig_caps flrig_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_FLRIG),
|
||||
.model_name = "FLRig",
|
||||
.mfg_name = "FLRig",
|
||||
.version = "20231113.0",
|
||||
.version = "20231216.0",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_STABLE,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
|
@ -242,6 +242,7 @@ static struct s_modeMap modeMap[] =
|
|||
{RIG_MODE_RTTY, NULL},
|
||||
{RIG_MODE_RTTYR, NULL},
|
||||
{RIG_MODE_C4FM, NULL},
|
||||
{RIG_MODE_DSTAR, NULL},
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
|
@ -894,11 +895,15 @@ static int flrig_open(RIG *rig)
|
|||
|
||||
/* see if get_bwA is available */
|
||||
retval = flrig_transaction(rig, "rig.get_bwA", NULL, value, sizeof(value));
|
||||
int dummy;
|
||||
|
||||
if (retval == RIG_ENAVAIL) // must not have it
|
||||
if (retval == RIG_ENAVAIL || value[0] == 0
|
||||
|| sscanf(value, "%d", &dummy) == 0) // must not have it
|
||||
{
|
||||
priv->has_get_bwA = 0;
|
||||
priv->has_get_bwB = 0; // if we don't have A then surely we don't have B either
|
||||
priv->has_set_bwA = 0; // and we don't have set functions either
|
||||
priv->has_set_bwB = 0;
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: get_bwA/B is not available=%s\n", __func__,
|
||||
value);
|
||||
}
|
||||
|
@ -1088,6 +1093,7 @@ static int flrig_open(RIG *rig)
|
|||
else if (streq(p, "UCW")) { modeMapAdd(&modes, RIG_MODE_CW, p); }
|
||||
else if (streq(p, "C4FM")) { modeMapAdd(&modes, RIG_MODE_C4FM, p); }
|
||||
else if (streq(p, "SPEC")) { modeMapAdd(&modes, RIG_MODE_SPEC, p); }
|
||||
else if (streq(p, "DV")) { modeMapAdd(&modes, RIG_MODE_DSTAR, p); }
|
||||
else if (streq(p, "DRM")) // we don't support DRM yet (or maybe ever)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: no mapping for mode %s\n", __func__, p);
|
||||
|
@ -1209,6 +1215,9 @@ static int flrig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
|
||||
*freq = atof(value);
|
||||
|
||||
|
||||
#if 0 // zero is actually valid for PowerSDR
|
||||
|
||||
if (*freq == 0)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: freq==0??\nvalue=%s\n", __func__,
|
||||
|
@ -1216,6 +1225,7 @@ static int flrig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
RETURNFUNC(-RIG_EPROTO);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: freq=%.0f\n", __func__, *freq);
|
||||
}
|
||||
|
@ -1750,14 +1760,15 @@ static int flrig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
/* so we may not be 100% accurate if op is twiddling knobs */
|
||||
cmdp = "rig.get_bwA";
|
||||
retval = flrig_transaction(rig, cmdp, NULL, value, sizeof(value));
|
||||
if (retval == RIG_OK && strstr(value,"NONE"))
|
||||
|
||||
if (retval == RIG_OK && strstr(value, "NONE"))
|
||||
{
|
||||
priv->has_get_bwA = priv->has_get_bwB = 0;
|
||||
*width = 0;
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: does not have rig.get_bwA/B\n", __func__);
|
||||
}
|
||||
|
||||
if (retval != RIG_OK || strstr(value,"NONE"))
|
||||
if (retval != RIG_OK || strstr(value, "NONE"))
|
||||
{
|
||||
RETURNFUNC(retval);
|
||||
}
|
||||
|
@ -1767,7 +1778,8 @@ static int flrig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
{
|
||||
cmdp = "rig.get_bwB";
|
||||
retval = flrig_transaction(rig, cmdp, NULL, value, sizeof(value));
|
||||
if (retval == RIG_OK && strlen(value)==0)
|
||||
|
||||
if (retval == RIG_OK && strlen(value) == 0)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: does not have rig.get_bwB\n", __func__);
|
||||
priv->has_get_bwB = 0;
|
||||
|
@ -2515,8 +2527,8 @@ HAMLIB_EXPORT(int) flrig_cat_string(RIG *rig, const char *arg)
|
|||
return retval;
|
||||
}
|
||||
|
||||
HAMLIB_EXPORT(int) flrig_set_func(RIG *rig, vfo_t vfo, setting_t func,
|
||||
int status)
|
||||
int flrig_set_func(RIG *rig, vfo_t vfo, setting_t func,
|
||||
int status)
|
||||
{
|
||||
int retval;
|
||||
char cmd_arg[MAXARGLEN];
|
||||
|
|
|
@ -28,6 +28,6 @@
|
|||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
extern const struct rig_caps flrig_caps;
|
||||
extern struct rig_caps flrig_caps;
|
||||
|
||||
#endif /* _FLRIG_H */
|
||||
|
|
|
@ -861,6 +861,7 @@ static int netrigctl_open(RIG *rig)
|
|||
else if (strcmp(setting, "parm_gran") == 0)
|
||||
{
|
||||
char *p = strtok(value, ";");
|
||||
|
||||
for (i = 0; p != NULL && i < RIG_SETTING_MAX; ++i)
|
||||
{
|
||||
int level;
|
||||
|
@ -882,6 +883,7 @@ static int netrigctl_open(RIG *rig)
|
|||
rig->caps->parm_gran[i].max.i = rs->parm_gran[i].max.i = max;
|
||||
rig->caps->parm_gran[i].step.i = rs->parm_gran[i].step.i = step;
|
||||
}
|
||||
|
||||
p = strtok(NULL, ";");
|
||||
}
|
||||
}
|
||||
|
@ -2577,7 +2579,7 @@ static int netrigctl_send_voice_mem(RIG *rig, vfo_t vfo, int ch)
|
|||
static int netrigctl_send_morse(RIG *rig, vfo_t vfo, const char *msg)
|
||||
{
|
||||
int ret, len;
|
||||
char *cmdp;
|
||||
char *cmdp;
|
||||
const char cmd[] = "\\send_morse ";
|
||||
char buf[BUF_MAX];
|
||||
|
||||
|
|
|
@ -199,8 +199,10 @@ static int quisk_cleanup(RIG *rig)
|
|||
}
|
||||
|
||||
// these are in netrigctl.c
|
||||
extern int parse_array_int(const char *s, const char *delim, int *array, int array_len);
|
||||
extern int parse_array_double(const char *s, const char *delim, double *array, int array_len);
|
||||
extern int parse_array_int(const char *s, const char *delim, int *array,
|
||||
int array_len);
|
||||
extern int parse_array_double(const char *s, const char *delim, double *array,
|
||||
int array_len);
|
||||
|
||||
static int quisk_open(RIG *rig)
|
||||
{
|
||||
|
@ -554,6 +556,7 @@ static int quisk_open(RIG *rig)
|
|||
{
|
||||
RETURNFUNC((ret < 0) ? ret : -RIG_EPROTO);
|
||||
}
|
||||
|
||||
HAMLIB_TRACE;
|
||||
|
||||
rig->caps->has_set_parm = rs->has_set_parm = strtoll(buf, NULL, 0);
|
||||
|
@ -564,6 +567,7 @@ static int quisk_open(RIG *rig)
|
|||
rs->mode_list |= rs->rx_range_list[i].modes;
|
||||
rs->vfo_list |= rs->rx_range_list[i].vfo;
|
||||
}
|
||||
|
||||
HAMLIB_TRACE;
|
||||
|
||||
for (i = 0; i < HAMLIB_FRQRANGESIZ
|
||||
|
@ -572,6 +576,7 @@ static int quisk_open(RIG *rig)
|
|||
rs->mode_list |= rs->tx_range_list[i].modes;
|
||||
rs->vfo_list |= rs->tx_range_list[i].vfo;
|
||||
}
|
||||
|
||||
HAMLIB_TRACE;
|
||||
|
||||
if (rs->vfo_list == 0)
|
||||
|
@ -580,10 +585,12 @@ static int quisk_open(RIG *rig)
|
|||
__func__);
|
||||
rs->vfo_list = RIG_VFO_A | RIG_VFO_B;
|
||||
}
|
||||
|
||||
HAMLIB_TRACE;
|
||||
#endif
|
||||
|
||||
if (prot_ver == 0) { RETURNFUNC(RIG_OK); }
|
||||
|
||||
HAMLIB_TRACE;
|
||||
|
||||
// otherwise we continue reading protocol 1 fields
|
||||
|
@ -805,6 +812,7 @@ static int quisk_open(RIG *rig)
|
|||
else if (strcmp(setting, "parm_gran") == 0)
|
||||
{
|
||||
char *p = strtok(value, ";");
|
||||
|
||||
for (i = 0; p != NULL && i < RIG_SETTING_MAX; ++i)
|
||||
{
|
||||
int level;
|
||||
|
@ -826,6 +834,7 @@ static int quisk_open(RIG *rig)
|
|||
rig->caps->parm_gran[i].max.i = rs->parm_gran[i].max.i = max;
|
||||
rig->caps->parm_gran[i].step.i = rs->parm_gran[i].step.i = step;
|
||||
}
|
||||
|
||||
p = strtok(NULL, ";");
|
||||
}
|
||||
}
|
||||
|
@ -961,7 +970,7 @@ static int quisk_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
|
||||
|
||||
static int quisk_set_mode(RIG *rig, vfo_t vfo, rmode_t mode,
|
||||
pbwidth_t width)
|
||||
pbwidth_t width)
|
||||
{
|
||||
int ret;
|
||||
char cmd[CMD_MAX];
|
||||
|
@ -991,7 +1000,7 @@ static int quisk_set_mode(RIG *rig, vfo_t vfo, rmode_t mode,
|
|||
|
||||
|
||||
static int quisk_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode,
|
||||
pbwidth_t *width)
|
||||
pbwidth_t *width)
|
||||
{
|
||||
int ret;
|
||||
char cmd[CMD_MAX];
|
||||
|
@ -1186,7 +1195,7 @@ static int quisk_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
|
|||
|
||||
|
||||
static int quisk_set_rptr_shift(RIG *rig, vfo_t vfo,
|
||||
rptr_shift_t rptr_shift)
|
||||
rptr_shift_t rptr_shift)
|
||||
{
|
||||
int ret;
|
||||
char cmd[CMD_MAX];
|
||||
|
@ -1215,7 +1224,7 @@ static int quisk_set_rptr_shift(RIG *rig, vfo_t vfo,
|
|||
|
||||
|
||||
static int quisk_get_rptr_shift(RIG *rig, vfo_t vfo,
|
||||
rptr_shift_t *rptr_shift)
|
||||
rptr_shift_t *rptr_shift)
|
||||
{
|
||||
int ret;
|
||||
char cmd[CMD_MAX];
|
||||
|
@ -1581,7 +1590,7 @@ static int quisk_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
|
|||
}
|
||||
|
||||
static int quisk_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
|
||||
pbwidth_t tx_width)
|
||||
pbwidth_t tx_width)
|
||||
{
|
||||
int ret;
|
||||
char cmd[CMD_MAX];
|
||||
|
@ -1610,7 +1619,7 @@ static int quisk_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
|
|||
}
|
||||
|
||||
static int quisk_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
|
||||
pbwidth_t *tx_width)
|
||||
pbwidth_t *tx_width)
|
||||
{
|
||||
int ret;
|
||||
char cmd[CMD_MAX];
|
||||
|
@ -1650,7 +1659,7 @@ static int quisk_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
|
|||
}
|
||||
|
||||
static int quisk_set_split_vfo(RIG *rig, vfo_t vfo, split_t split,
|
||||
vfo_t tx_vfo)
|
||||
vfo_t tx_vfo)
|
||||
{
|
||||
int ret;
|
||||
char cmd[CMD_MAX];
|
||||
|
@ -1680,7 +1689,7 @@ static int quisk_set_split_vfo(RIG *rig, vfo_t vfo, split_t split,
|
|||
|
||||
|
||||
static int quisk_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split,
|
||||
vfo_t *tx_vfo)
|
||||
vfo_t *tx_vfo)
|
||||
{
|
||||
int ret;
|
||||
char cmd[CMD_MAX];
|
||||
|
@ -1952,7 +1961,7 @@ static int quisk_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
|
|||
|
||||
|
||||
static int quisk_set_level(RIG *rig, vfo_t vfo, setting_t level,
|
||||
value_t val)
|
||||
value_t val)
|
||||
{
|
||||
int ret;
|
||||
char cmd[CMD_MAX];
|
||||
|
@ -1993,7 +2002,7 @@ static int quisk_set_level(RIG *rig, vfo_t vfo, setting_t level,
|
|||
|
||||
|
||||
static int quisk_get_level(RIG *rig, vfo_t vfo, setting_t level,
|
||||
value_t *val)
|
||||
value_t *val)
|
||||
{
|
||||
int ret;
|
||||
char cmd[CMD_MAX];
|
||||
|
@ -2208,7 +2217,7 @@ static int quisk_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
|
|||
|
||||
|
||||
static int quisk_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option,
|
||||
ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx)
|
||||
ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx)
|
||||
{
|
||||
int ret;
|
||||
char cmd[CMD_MAX];
|
||||
|
@ -2645,7 +2654,7 @@ static int quisk_get_trn(RIG *rig, int *trn)
|
|||
#endif
|
||||
|
||||
static int quisk_mW2power(RIG *rig, float *power, unsigned int mwpower,
|
||||
freq_t freq, rmode_t mode)
|
||||
freq_t freq, rmode_t mode)
|
||||
{
|
||||
char cmdbuf[32];
|
||||
char buf[BUF_MAX];
|
||||
|
@ -2669,7 +2678,7 @@ static int quisk_mW2power(RIG *rig, float *power, unsigned int mwpower,
|
|||
|
||||
|
||||
static int quisk_power2mW(RIG *rig, unsigned int *mwpower, float power,
|
||||
freq_t freq, rmode_t mode)
|
||||
freq_t freq, rmode_t mode)
|
||||
{
|
||||
char cmdbuf[64];
|
||||
char buf[BUF_MAX];
|
||||
|
|
|
@ -354,7 +354,7 @@ static void dummy_rot_simulate_rotation(ROT *rot)
|
|||
static int dummy_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
|
||||
{
|
||||
const struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)
|
||||
rot->state.priv;
|
||||
rot->state.priv;
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
|
@ -416,7 +416,7 @@ static int dummy_rot_reset(ROT *rot, rot_reset_t reset)
|
|||
static int dummy_rot_move(ROT *rot, int direction, int speed)
|
||||
{
|
||||
const struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)
|
||||
rot->state.priv;
|
||||
rot->state.priv;
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: Direction = %d, Speed = %d\n", __func__,
|
||||
|
@ -474,7 +474,7 @@ static int dummy_set_func(ROT *rot, setting_t func, int status)
|
|||
static int dummy_get_func(ROT *rot, setting_t func, int *status)
|
||||
{
|
||||
const struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)
|
||||
rot->state.priv;
|
||||
rot->state.priv;
|
||||
|
||||
*status = (priv->funcs & func) ? 1 : 0;
|
||||
|
||||
|
@ -904,7 +904,7 @@ static int dummy_get_ext_parm(ROT *rot, token_t token, value_t *val)
|
|||
static int dummy_rot_get_status(ROT *rot, rot_status_t *status)
|
||||
{
|
||||
const struct dummy_rot_priv_data *priv = (struct dummy_rot_priv_data *)
|
||||
rot->state.priv;
|
||||
rot->state.priv;
|
||||
|
||||
if (simulating)
|
||||
{
|
||||
|
|
|
@ -245,7 +245,7 @@ static int sdrsharp_transaction(RIG *rig, char *cmd, char *value,
|
|||
if (value)
|
||||
{
|
||||
read_transaction(rig, xml, sizeof(xml)); // this might time out -- that's OK
|
||||
strncpy(value, xml, value_len);
|
||||
strncpy(value, xml, value_len);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -486,10 +486,12 @@ static int sdrsharp_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
}
|
||||
|
||||
#if 0
|
||||
|
||||
if (vfo == RIG_VFO_CURR)
|
||||
{
|
||||
vfo = rig->state.current_vfo;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SNPRINTF(cmd, sizeof(cmd), "F %.0lf\n", freq);
|
||||
|
@ -519,7 +521,7 @@ static int sdrsharp_get_vfo(RIG *rig, vfo_t *vfo)
|
|||
RETURNFUNC(RIG_OK);
|
||||
}
|
||||
|
||||
const struct rig_caps sdrsharp_caps =
|
||||
struct rig_caps sdrsharp_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_SDRSHARP),
|
||||
.model_name = "SDR#/gpredict",
|
||||
|
|
|
@ -132,7 +132,7 @@ static const struct confparams tci1x_ext_parms[] =
|
|||
{ RIG_CONF_END, NULL, }
|
||||
};
|
||||
|
||||
const struct rig_caps tci1x_caps =
|
||||
struct rig_caps tci1x_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_TCI1X),
|
||||
.model_name = "TCI1.X",
|
||||
|
|
|
@ -477,7 +477,7 @@ static int trxmanager_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
char response[MAXCMDLEN] = "";
|
||||
struct rig_state *rs = &rig->state;
|
||||
const struct trxmanager_priv_data *priv = (struct trxmanager_priv_data *)
|
||||
rig->state.priv;
|
||||
rig->state.priv;
|
||||
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s freq=%.1f\n", __func__,
|
||||
|
@ -1215,7 +1215,7 @@ static int trxmanager_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *freq,
|
|||
static const char *trxmanager_get_info(RIG *rig)
|
||||
{
|
||||
const struct trxmanager_priv_data *priv = (struct trxmanager_priv_data *)
|
||||
rig->state.priv;
|
||||
rig->state.priv;
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
return priv->info;
|
||||
|
|
|
@ -915,6 +915,7 @@ int elad_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo)
|
|||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
retval = elad_get_split_vfo_if(rig, vfo, &tsplit, &tvfo);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
return retval;
|
||||
|
@ -983,10 +984,12 @@ int elad_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo)
|
|||
}
|
||||
|
||||
retval = elad_set_split(rig, vfo, split, txvfo);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* Remember whether split is on, for elad_set_vfo */
|
||||
priv->split = split;
|
||||
|
||||
|
@ -2468,7 +2471,7 @@ int elad_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
|
|||
*/
|
||||
int elad_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
|
||||
{
|
||||
const struct rig_caps *caps;
|
||||
struct rig_caps *caps;
|
||||
char tonebuf[16];
|
||||
int i;
|
||||
|
||||
|
@ -2498,7 +2501,7 @@ int elad_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
|
|||
|
||||
int elad_set_ctcss_tone_tn(RIG *rig, vfo_t vfo, tone_t tone)
|
||||
{
|
||||
const struct rig_caps *caps = rig->caps;
|
||||
struct rig_caps *caps = rig->caps;
|
||||
char buf[16];
|
||||
int i;
|
||||
|
||||
|
@ -2560,7 +2563,7 @@ int elad_set_ctcss_tone_tn(RIG *rig, vfo_t vfo, tone_t tone)
|
|||
int elad_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
|
||||
{
|
||||
const struct elad_priv_data *priv = rig->state.priv;
|
||||
const struct rig_caps *caps;
|
||||
struct rig_caps *caps;
|
||||
char tonebuf[3];
|
||||
int i, retval;
|
||||
unsigned int tone_idx;
|
||||
|
@ -2637,7 +2640,7 @@ int elad_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
|
|||
|
||||
int elad_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
|
||||
{
|
||||
const struct rig_caps *caps = rig->caps;
|
||||
struct rig_caps *caps = rig->caps;
|
||||
char buf[16];
|
||||
int i;
|
||||
|
||||
|
@ -2693,7 +2696,7 @@ int elad_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
|
|||
|
||||
int elad_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone)
|
||||
{
|
||||
const struct rig_caps *caps;
|
||||
struct rig_caps *caps;
|
||||
char cmd[4];
|
||||
char tonebuf[6];
|
||||
int offs;
|
||||
|
|
|
@ -164,7 +164,7 @@ int elad_get_trn(RIG *rig, int *trn);
|
|||
int get_elad_level(RIG *rig, const char *cmd, float *f);
|
||||
int get_elad_func(RIG *rig, const char *cmd, int *status);
|
||||
|
||||
extern const struct rig_caps fdm_duo_caps;
|
||||
extern struct rig_caps fdm_duo_caps;
|
||||
|
||||
#if 0
|
||||
/* use when not interested in the answer, but want to check its len */
|
||||
|
|
|
@ -328,7 +328,7 @@ static struct elad_priv_caps fdm_duo_priv_caps =
|
|||
* Notice that some rigs share the same functions.
|
||||
* Also this struct is READONLY!
|
||||
*/
|
||||
const struct rig_caps fdm_duo_caps =
|
||||
struct rig_caps fdm_duo_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_ELAD_FDM_DUO),
|
||||
.model_name = "FDM-DUO",
|
||||
|
|
|
@ -155,7 +155,7 @@ static const struct hamlib_vs_dttsp
|
|||
{ 50, 40 }, /* +40 */ \
|
||||
} }
|
||||
|
||||
const struct rig_caps dttsp_rig_caps =
|
||||
struct rig_caps dttsp_rig_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_DTTSP),
|
||||
.model_name = "DttSP IPC",
|
||||
|
@ -241,7 +241,7 @@ const struct rig_caps dttsp_rig_caps =
|
|||
/*
|
||||
* The same as the previous IPC, but of type RIG_PORT_UDP_NETWORK
|
||||
*/
|
||||
const struct rig_caps dttsp_udp_rig_caps =
|
||||
struct rig_caps dttsp_udp_rig_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_DTTSP_UDP),
|
||||
.model_name = "DttSP UDP",
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
|
||||
#include "hamlib/rig.h"
|
||||
|
||||
extern const struct rig_caps sdr1k_rig_caps;
|
||||
extern const struct rig_caps sdr1krfe_rig_caps;
|
||||
extern const struct rig_caps dttsp_rig_caps;
|
||||
extern const struct rig_caps dttsp_udp_rig_caps;
|
||||
extern struct rig_caps sdr1k_rig_caps;
|
||||
extern struct rig_caps sdr1krfe_rig_caps;
|
||||
extern struct rig_caps dttsp_rig_caps;
|
||||
extern struct rig_caps dttsp_udp_rig_caps;
|
||||
|
||||
#endif /* _FLEXRADIO_H */
|
||||
|
|
|
@ -110,7 +110,7 @@ struct sdr1k_priv_data
|
|||
* What about IOUD_Clock?
|
||||
*/
|
||||
|
||||
const struct rig_caps sdr1k_rig_caps =
|
||||
struct rig_caps sdr1k_rig_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_SDR1000),
|
||||
.model_name = "SDR-1000",
|
||||
|
|
|
@ -83,7 +83,8 @@ static int gomx_set(RIG *rig, int table, char *varname, char *varvalue);
|
|||
/**
|
||||
* Get variable from the GS100 configuration table
|
||||
*/
|
||||
static int gomx_get(RIG *rig, int table, char *varname, const char *varvalue, int varvalue_len);
|
||||
static int gomx_get(RIG *rig, int table, char *varname, const char *varvalue,
|
||||
int varvalue_len);
|
||||
|
||||
/**
|
||||
* Sends a message to the GS100 and parses response lines
|
||||
|
@ -217,8 +218,9 @@ static int gs100_get_conf(RIG *rig, token_t token, char *val)
|
|||
static int gs100_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
||||
{
|
||||
#ifdef _LOCAL_SIMULATION_
|
||||
__attribute__((unused)) const struct gs100_priv_data *priv = (struct gs100_priv_data
|
||||
*)rig->state.priv;
|
||||
__attribute__((unused)) const struct gs100_priv_data *priv =
|
||||
(struct gs100_priv_data
|
||||
*)rig->state.priv;
|
||||
#endif
|
||||
char fstr[20], value[20];
|
||||
int retval;
|
||||
|
@ -251,8 +253,9 @@ static int gs100_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
static int gs100_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
||||
{
|
||||
#ifdef _LOCAL_SIMULATION_
|
||||
__attribute__((unused)) const struct gs100_priv_data *priv = (struct gs100_priv_data
|
||||
*)rig->state.priv;
|
||||
__attribute__((unused)) const struct gs100_priv_data *priv =
|
||||
(struct gs100_priv_data
|
||||
*)rig->state.priv;
|
||||
#endif
|
||||
char resp[20];
|
||||
int retval;
|
||||
|
@ -287,8 +290,9 @@ static int gs100_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
static int gs100_set_tx_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
||||
{
|
||||
#ifdef _LOCAL_SIMULATION_
|
||||
__attribute__((unused)) const struct gs100_priv_data *priv = (struct gs100_priv_data
|
||||
*)rig->state.priv;
|
||||
__attribute__((unused)) const struct gs100_priv_data *priv =
|
||||
(struct gs100_priv_data
|
||||
*)rig->state.priv;
|
||||
#endif
|
||||
char fstr[20], value[20];
|
||||
int retval;
|
||||
|
@ -321,8 +325,9 @@ static int gs100_set_tx_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
static int gs100_get_tx_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
||||
{
|
||||
#ifdef _LOCAL_SIMULATION_
|
||||
__attribute__((unused)) const struct gs100_priv_data *priv = (struct gs100_priv_data
|
||||
*)rig->state.priv;
|
||||
__attribute__((unused)) const struct gs100_priv_data *priv =
|
||||
(struct gs100_priv_data
|
||||
*)rig->state.priv;
|
||||
#endif
|
||||
char resp[20];
|
||||
int retval;
|
||||
|
@ -470,7 +475,8 @@ static int gomx_set(RIG *rig, int table, char *varname, char *varvalue)
|
|||
|
||||
|
||||
/* Get variable from the GS100 configuration table */
|
||||
static int gomx_get(RIG *rig, int table, char *varname, const char *varvalue, int varvalue_len)
|
||||
static int gomx_get(RIG *rig, int table, char *varname, const char *varvalue,
|
||||
int varvalue_len)
|
||||
{
|
||||
__attribute__((unused)) struct gs100_priv_data *priv = (struct gs100_priv_data
|
||||
*)rig->state.priv;
|
||||
|
@ -504,6 +510,7 @@ static int gomx_get(RIG *rig, int table, char *varname, const char *varvalue, in
|
|||
if ((c = strchr(resp, '=')) == NULL) { return (-RIG_EPROTO); }
|
||||
|
||||
snprintf(fmt, sizeof(fmt), "%%%ds", varvalue_len);
|
||||
|
||||
if (sscanf(c + 1, fmt, varvalue_len) != 1) { return (-RIG_EPROTO); }
|
||||
|
||||
return (RIG_OK);
|
||||
|
|
|
@ -47,8 +47,8 @@
|
|||
/* RIG capabilities descriptions */
|
||||
extern struct rig_caps gs100_caps;
|
||||
extern struct rig_caps netrigctl_caps;
|
||||
extern const struct rig_caps flrig_caps;
|
||||
extern const struct rig_caps trxmanager_caps;
|
||||
extern struct rig_caps flrig_caps;
|
||||
extern struct rig_caps trxmanager_caps;
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ static const struct icmarine_priv_caps icm700pro_priv_caps =
|
|||
.default_remote_id = 2,
|
||||
};
|
||||
|
||||
const struct rig_caps icm700pro_caps =
|
||||
struct rig_caps icm700pro_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC_M700PRO),
|
||||
.model_name = "IC-M700PRO",
|
||||
|
|
|
@ -57,7 +57,7 @@ static const struct icm710_priv_caps icm710_priv_caps =
|
|||
};
|
||||
|
||||
|
||||
const struct rig_caps icm710_caps =
|
||||
struct rig_caps icm710_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC_M710),
|
||||
.model_name = "IC-M710",
|
||||
|
@ -251,7 +251,7 @@ int icm710_init(RIG *rig)
|
|||
{
|
||||
struct icm710_priv_data *priv;
|
||||
const struct icm710_priv_caps *priv_caps;
|
||||
const struct rig_caps *caps;
|
||||
struct rig_caps *caps;
|
||||
|
||||
if (!rig || !rig->caps)
|
||||
{
|
||||
|
|
|
@ -75,8 +75,8 @@ int icm710_set_conf(RIG *rig, token_t token, const char *val);
|
|||
int icm710_get_conf(RIG *rig, token_t token, char *val);
|
||||
int icm710_get_conf2(RIG *rig, token_t token, char *val, int val_len);
|
||||
|
||||
extern const struct rig_caps icm700pro_caps;
|
||||
extern const struct rig_caps icm710_caps;
|
||||
extern const struct rig_caps icm802_caps;
|
||||
extern struct rig_caps icm700pro_caps;
|
||||
extern struct rig_caps icm710_caps;
|
||||
extern struct rig_caps icm802_caps;
|
||||
|
||||
#endif /* _ICM710_H */
|
||||
|
|
|
@ -50,7 +50,7 @@ static const struct icmarine_priv_caps icm802_priv_caps =
|
|||
};
|
||||
|
||||
|
||||
const struct rig_caps icm802_caps =
|
||||
struct rig_caps icm802_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC_M802),
|
||||
.model_name = "IC-M802",
|
||||
|
|
|
@ -50,7 +50,7 @@ static const struct icmarine_priv_caps icm803_priv_caps =
|
|||
};
|
||||
|
||||
|
||||
const struct rig_caps icm803_caps =
|
||||
struct rig_caps icm803_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC_M803),
|
||||
.model_name = "IC-M803",
|
||||
|
|
|
@ -113,7 +113,7 @@ int icmarine_init(RIG *rig)
|
|||
{
|
||||
struct icmarine_priv_data *priv;
|
||||
const struct icmarine_priv_caps *priv_caps;
|
||||
const struct rig_caps *caps;
|
||||
struct rig_caps *caps;
|
||||
|
||||
if (!rig || !rig->caps)
|
||||
{
|
||||
|
|
|
@ -65,9 +65,9 @@ int icmarine_set_conf(RIG *rig, token_t token, const char *val);
|
|||
int icmarine_get_conf(RIG *rig, token_t token, char *val);
|
||||
int icmarine_get_conf2(RIG *rig, token_t token, char *val, int val_len);
|
||||
|
||||
extern const struct rig_caps icm700pro_caps;
|
||||
extern const struct rig_caps icm710_caps;
|
||||
extern const struct rig_caps icm802_caps;
|
||||
extern const struct rig_caps icm803_caps;
|
||||
extern struct rig_caps icm700pro_caps;
|
||||
extern struct rig_caps icm710_caps;
|
||||
extern struct rig_caps icm802_caps;
|
||||
extern struct rig_caps icm803_caps;
|
||||
|
||||
#endif /* _ICMARINE_H */
|
||||
|
|
|
@ -52,7 +52,7 @@ static const struct icom_priv_caps delta2_priv_caps =
|
|||
ic737_ts_sc_list /* TODO: ts_sc_list */
|
||||
};
|
||||
|
||||
const struct rig_caps delta2_caps =
|
||||
struct rig_caps delta2_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_DELTAII),
|
||||
.model_name = "Delta II",
|
||||
|
|
|
@ -261,7 +261,7 @@ collision_retry:
|
|||
|
||||
// first 2 bytes of everyting are 0xfe so we won't test those
|
||||
// this allows some corruptin of the 0xfe bytes which has been seen in the wild
|
||||
if (memcmp(&buf[2], &sendbuf[2], frm_len-2) != 0)
|
||||
if (memcmp(&buf[2], &sendbuf[2], frm_len - 2) != 0)
|
||||
{
|
||||
/* Frames are different? */
|
||||
/* Problem on ci-v bus? */
|
||||
|
@ -290,8 +290,11 @@ read_another_frame:
|
|||
*/
|
||||
buf[0] = 0;
|
||||
frm_len = read_icom_frame(&rs->rigport, buf, sizeof(buf));
|
||||
|
||||
if (frm_len > 4 && memcmp(buf, sendbuf, frm_len) == 0)
|
||||
{
|
||||
priv->serial_USB_echo_off = 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
|
@ -587,7 +590,8 @@ int rig2icom_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width,
|
|||
unsigned char icmode;
|
||||
signed char icmode_ext;
|
||||
pbwidth_t width_tmp = width;
|
||||
const struct icom_priv_data *priv_data = (struct icom_priv_data *) rig->state.priv;
|
||||
const struct icom_priv_data *priv_data = (struct icom_priv_data *)
|
||||
rig->state.priv;
|
||||
|
||||
ENTERFUNC;
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: mode=%d, width=%d\n", __func__, (int)mode,
|
||||
|
|
|
@ -40,7 +40,7 @@ static const struct icom_priv_caps ic1275_priv_caps =
|
|||
ic737_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic1275_caps =
|
||||
struct rig_caps ic1275_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC1275),
|
||||
.model_name = "IC-1275",
|
||||
|
|
|
@ -49,7 +49,7 @@ static const struct icom_priv_caps ic271_priv_caps =
|
|||
ic737_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic271_caps =
|
||||
struct rig_caps ic271_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC271),
|
||||
.model_name = "IC-271",
|
||||
|
|
|
@ -59,7 +59,7 @@ static const struct icom_priv_caps ic2730_priv_caps =
|
|||
1, /* no XCHG */
|
||||
};
|
||||
|
||||
const struct rig_caps ic2730_caps =
|
||||
struct rig_caps ic2730_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC2730),
|
||||
.model_name = "IC-2730",
|
||||
|
|
|
@ -52,7 +52,7 @@ static const struct icom_priv_caps ic375_priv_caps =
|
|||
ic737_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic275_caps =
|
||||
struct rig_caps ic275_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC275),
|
||||
.model_name = "IC-275",
|
||||
|
@ -151,7 +151,7 @@ const struct rig_caps ic275_caps =
|
|||
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
|
||||
};
|
||||
|
||||
const struct rig_caps ic375_caps =
|
||||
struct rig_caps ic375_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC375),
|
||||
.model_name = "IC-375",
|
||||
|
|
|
@ -48,7 +48,7 @@ static const struct icom_priv_caps ic471_priv_caps =
|
|||
ic737_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic471_caps =
|
||||
struct rig_caps ic471_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC471),
|
||||
.model_name = "IC-471",
|
||||
|
|
|
@ -44,7 +44,7 @@ static const struct icom_priv_caps ic475_priv_caps =
|
|||
ic737_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic475_caps =
|
||||
struct rig_caps ic475_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC475),
|
||||
.model_name = "IC-475",
|
||||
|
@ -150,7 +150,7 @@ static const struct icom_priv_caps ic575_priv_caps =
|
|||
ic737_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic575_caps =
|
||||
struct rig_caps ic575_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC575),
|
||||
.model_name = "IC-575",
|
||||
|
|
|
@ -190,7 +190,7 @@ static const struct icom_priv_caps IC7000_priv_caps =
|
|||
.r2i_mode = ic7000_r2i_mode
|
||||
};
|
||||
|
||||
const struct rig_caps ic7000_caps =
|
||||
struct rig_caps ic7000_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC7000),
|
||||
.model_name = "IC-7000",
|
||||
|
@ -221,8 +221,6 @@ const struct rig_caps ic7000_caps =
|
|||
.level_gran =
|
||||
{
|
||||
#include "level_gran_icom.h"
|
||||
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } },
|
||||
[LVL_VOXDELAY] = { .min = { .i = 0 }, .max = { .i = 20 }, .step = { .i = 1 } },
|
||||
[LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } },
|
||||
[LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } },
|
||||
},
|
||||
|
|
|
@ -81,7 +81,7 @@ static const struct icom_priv_caps ic703_priv_caps =
|
|||
ic706_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic703_caps =
|
||||
struct rig_caps ic703_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC703),
|
||||
.model_name = "IC-703",
|
||||
|
@ -112,7 +112,6 @@ const struct rig_caps ic703_caps =
|
|||
.level_gran =
|
||||
{
|
||||
#include "level_gran_icom.h"
|
||||
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } },
|
||||
},
|
||||
.parm_gran = {},
|
||||
.ctcss_list = common_ctcss_list,
|
||||
|
|
|
@ -144,7 +144,7 @@ static const struct icom_priv_caps ic706_priv_caps =
|
|||
.r2i_mode = ic706_r2i_mode
|
||||
};
|
||||
|
||||
const struct rig_caps ic706_caps =
|
||||
struct rig_caps ic706_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC706),
|
||||
.model_name = "IC-706",
|
||||
|
@ -292,7 +292,7 @@ static const struct icom_priv_caps ic706mkii_priv_caps =
|
|||
.r2i_mode = ic706_r2i_mode
|
||||
};
|
||||
|
||||
const struct rig_caps ic706mkii_caps =
|
||||
struct rig_caps ic706mkii_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC706MKII),
|
||||
.model_name = "IC-706MkII",
|
||||
|
@ -463,7 +463,7 @@ static const struct icom_priv_caps ic706mkiig_priv_caps =
|
|||
.r2i_mode = ic706_r2i_mode
|
||||
};
|
||||
|
||||
const struct rig_caps ic706mkiig_caps =
|
||||
struct rig_caps ic706mkiig_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC706MKIIG),
|
||||
.model_name = "IC-706MkIIG",
|
||||
|
|
|
@ -54,7 +54,7 @@ static const struct icom_priv_caps ic707_priv_caps =
|
|||
ic737_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic707_caps =
|
||||
struct rig_caps ic707_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC707),
|
||||
.model_name = "IC-707",
|
||||
|
|
|
@ -288,10 +288,12 @@ int ic7100_get_clock(RIG *rig, int *year, int *month, int *day, int *hour,
|
|||
prmbuf[0] = 0x01;
|
||||
prmbuf[1] = 0x21;
|
||||
retval = icom_transaction(rig, cmd, subcmd, prmbuf, 2, respbuf, &resplen);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
return retval;
|
||||
}
|
||||
|
||||
*hour = from_bcd(&respbuf[4], 2);
|
||||
*min = from_bcd(&respbuf[5], 2);
|
||||
*sec = 0;
|
||||
|
@ -300,10 +302,12 @@ int ic7100_get_clock(RIG *rig, int *year, int *month, int *day, int *hour,
|
|||
prmbuf[0] = 0x01;
|
||||
prmbuf[1] = 0x23;
|
||||
retval = icom_transaction(rig, cmd, subcmd, prmbuf, 2, respbuf, &resplen);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
return retval;
|
||||
}
|
||||
|
||||
*utc_offset = from_bcd(&respbuf[4], 2) * 100;
|
||||
*utc_offset += from_bcd(&respbuf[5], 2);
|
||||
|
||||
|
@ -318,7 +322,7 @@ int ic7100_get_clock(RIG *rig, int *year, int *month, int *day, int *hour,
|
|||
return retval;
|
||||
}
|
||||
|
||||
const struct rig_caps ic7100_caps =
|
||||
struct rig_caps ic7100_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC7100),
|
||||
.model_name = "IC-7100",
|
||||
|
@ -349,8 +353,6 @@ const struct rig_caps ic7100_caps =
|
|||
.level_gran =
|
||||
{
|
||||
#include "level_gran_icom.h"
|
||||
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } },
|
||||
[LVL_VOXDELAY] = { .min = { .i = 0 }, .max = { .i = 20 }, .step = { .i = 1 } },
|
||||
[LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } },
|
||||
[LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } },
|
||||
},
|
||||
|
|
|
@ -72,7 +72,7 @@ static const struct icom_priv_caps IC718_priv_caps =
|
|||
ic718_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic718_caps =
|
||||
struct rig_caps ic718_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC718),
|
||||
.model_name = "IC-718",
|
||||
|
@ -103,7 +103,6 @@ const struct rig_caps ic718_caps =
|
|||
.level_gran =
|
||||
{
|
||||
#include "level_gran_icom.h"
|
||||
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } },
|
||||
},
|
||||
.parm_gran = {},
|
||||
.str_cal = IC718_STR_CAL,
|
||||
|
|
|
@ -125,7 +125,7 @@ static const struct icom_priv_caps IC7200_priv_caps =
|
|||
.data_mode_supported = 1
|
||||
};
|
||||
|
||||
const struct rig_caps ic7200_caps =
|
||||
struct rig_caps ic7200_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC7200),
|
||||
.model_name = "IC-7200",
|
||||
|
@ -156,8 +156,6 @@ const struct rig_caps ic7200_caps =
|
|||
.level_gran =
|
||||
{
|
||||
#include "level_gran_icom.h"
|
||||
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } },
|
||||
[LVL_VOXDELAY] = { .min = { .i = 0 }, .max = { .i = 20 }, .step = { .i = 1 } },
|
||||
[LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } },
|
||||
[LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } },
|
||||
},
|
||||
|
|
|
@ -52,7 +52,7 @@ static const struct icom_priv_caps ic725_priv_caps =
|
|||
ic737_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic725_caps =
|
||||
struct rig_caps ic725_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC725),
|
||||
.model_name = "IC-725",
|
||||
|
|
|
@ -54,7 +54,7 @@ static const struct icom_priv_caps ic726_priv_caps =
|
|||
ic737_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic726_caps =
|
||||
struct rig_caps ic726_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC726),
|
||||
.model_name = "IC-726",
|
||||
|
|
|
@ -54,7 +54,7 @@ static const struct icom_priv_caps ic728_priv_caps =
|
|||
ic737_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic728_caps =
|
||||
struct rig_caps ic728_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC728),
|
||||
.model_name = "IC-728",
|
||||
|
@ -173,7 +173,7 @@ static const struct icom_priv_caps ic729_priv_caps =
|
|||
ic737_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic729_caps =
|
||||
struct rig_caps ic729_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC729),
|
||||
.model_name = "IC-729",
|
||||
|
|
|
@ -715,7 +715,7 @@ static const struct icom_priv_caps IC905_priv_caps =
|
|||
.data_mode_supported = 1
|
||||
};
|
||||
|
||||
const struct rig_caps ic7300_caps =
|
||||
struct rig_caps ic7300_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC7300),
|
||||
.model_name = "IC-7300",
|
||||
|
@ -745,8 +745,6 @@ const struct rig_caps ic7300_caps =
|
|||
.has_set_parm = RIG_PARM_SET(IC7300_PARMS),
|
||||
.level_gran = {
|
||||
#include "level_gran_icom.h"
|
||||
[LVL_RAWSTR] = {.min = {.i = 0}, .max = {.i = 255}},
|
||||
[LVL_VOXDELAY] = {.min = {.i = 0}, .max = {.i = 20}, .step = {.i = 1}},
|
||||
[LVL_KEYSPD] = {.min = {.i = 6}, .max = {.i = 48}, .step = {.i = 1}},
|
||||
[LVL_CWPITCH] = {.min = {.i = 300}, .max = {.i = 900}, .step = {.i = 1}},
|
||||
[LVL_SPECTRUM_SPEED] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
|
||||
|
@ -784,6 +782,8 @@ const struct rig_caps ic7300_caps =
|
|||
|
||||
.chan_list = {
|
||||
{ 1, 99, RIG_MTYPE_MEM },
|
||||
{ 1, 8, RIG_MTYPE_VOICE },
|
||||
{ 1, 8, RIG_MTYPE_MORSE },
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
|
@ -966,7 +966,7 @@ struct rig_caps ic9700_caps =
|
|||
RIG_MODEL(RIG_MODEL_IC9700),
|
||||
.model_name = "IC-9700",
|
||||
.mfg_name = "Icom",
|
||||
.version = BACKEND_VER ".18",
|
||||
.version = BACKEND_VER ".19",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_STABLE,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
|
@ -991,8 +991,6 @@ struct rig_caps ic9700_caps =
|
|||
.has_set_parm = RIG_PARM_SET(IC9700_PARMS),
|
||||
.level_gran = {
|
||||
#include "level_gran_icom.h"
|
||||
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } },
|
||||
[LVL_VOXDELAY] = { .min = { .i = 0 }, .max = { .i = 20 }, .step = { .i = 1 } },
|
||||
[LVL_KEYSPD] = {.min = {.i = 6}, .max = {.i = 48}, .step = {.i = 1}},
|
||||
[LVL_CWPITCH] = {.min = {.i = 300}, .max = {.i = 900}, .step = {.i = 1}},
|
||||
[LVL_SPECTRUM_SPEED] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
|
||||
|
@ -1006,7 +1004,7 @@ struct rig_caps ic9700_caps =
|
|||
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}},
|
||||
[PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}},
|
||||
[PARM_KEYERTYPE] = {.step = {.s = "STRAIGHT,BUG,PADDLE"}},
|
||||
},
|
||||
},
|
||||
.ext_tokens = ic9700_ext_tokens,
|
||||
.extlevels = icom_ext_levels,
|
||||
.ctcss_list = full_ctcss_list,
|
||||
|
@ -1027,6 +1025,8 @@ struct rig_caps ic9700_caps =
|
|||
|
||||
.chan_list = {
|
||||
{ 1, 99, RIG_MTYPE_MEM },
|
||||
{ 1, 8, RIG_MTYPE_VOICE },
|
||||
{ 1, 8, RIG_MTYPE_MORSE },
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
|
@ -1285,7 +1285,7 @@ struct rig_caps ic9700_caps =
|
|||
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
|
||||
};
|
||||
|
||||
const struct rig_caps ic705_caps =
|
||||
struct rig_caps ic705_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC705),
|
||||
.model_name = "IC-705",
|
||||
|
@ -1315,8 +1315,6 @@ const struct rig_caps ic705_caps =
|
|||
.has_set_parm = RIG_PARM_SET(IC7300_PARMS),
|
||||
.level_gran = {
|
||||
#include "level_gran_icom.h"
|
||||
[LVL_RAWSTR] = {.min = {.i = 0}, .max = {.i = 255}},
|
||||
[LVL_VOXDELAY] = {.min = {.i = 0}, .max = {.i = 20}, .step = {.i = 1}},
|
||||
[LVL_KEYSPD] = {.min = {.i = 6}, .max = {.i = 48}, .step = {.i = 1}},
|
||||
[LVL_CWPITCH] = {.min = {.i = 300}, .max = {.i = 900}, .step = {.i = 1}},
|
||||
[LVL_SPECTRUM_SPEED] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
|
||||
|
@ -1329,7 +1327,7 @@ const struct rig_caps ic705_caps =
|
|||
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDWFM,BANDAIR,BAND70CM,BAND33CM,BANDGEN"}},
|
||||
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}},
|
||||
[PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}},
|
||||
},
|
||||
},
|
||||
.ext_tokens = ic705_ext_tokens,
|
||||
.extlevels = icom_ext_levels,
|
||||
.ctcss_list = full_ctcss_list,
|
||||
|
@ -1350,6 +1348,8 @@ const struct rig_caps ic705_caps =
|
|||
|
||||
.chan_list = {
|
||||
{ 1, 99, RIG_MTYPE_MEM },
|
||||
{ 1, 8, RIG_MTYPE_VOICE },
|
||||
{ 1, 8, RIG_MTYPE_MORSE },
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
|
@ -1558,7 +1558,7 @@ const struct rig_caps ic705_caps =
|
|||
.hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS
|
||||
};
|
||||
|
||||
const struct rig_caps ic905_caps =
|
||||
struct rig_caps ic905_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC905),
|
||||
.model_name = "IC-905",
|
||||
|
@ -1588,8 +1588,6 @@ const struct rig_caps ic905_caps =
|
|||
.has_set_parm = RIG_PARM_SET(IC7300_PARMS),
|
||||
.level_gran = {
|
||||
#include "level_gran_icom.h"
|
||||
[LVL_RAWSTR] = {.min = {.i = 0}, .max = {.i = 255}},
|
||||
[LVL_VOXDELAY] = {.min = {.i = 0}, .max = {.i = 20}, .step = {.i = 1}},
|
||||
[LVL_KEYSPD] = {.min = {.i = 6}, .max = {.i = 48}, .step = {.i = 1}},
|
||||
[LVL_CWPITCH] = {.min = {.i = 300}, .max = {.i = 900}, .step = {.i = 1}},
|
||||
[LVL_SPECTRUM_SPEED] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
|
||||
|
@ -1603,7 +1601,7 @@ const struct rig_caps ic905_caps =
|
|||
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}},
|
||||
[PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}},
|
||||
[PARM_KEYERTYPE] = {.step = {.s = "STRAIGHT,BUG,PADDLE"}},
|
||||
},
|
||||
},
|
||||
.ext_tokens = ic705_ext_tokens,
|
||||
.extlevels = icom_ext_levels,
|
||||
.ctcss_list = full_ctcss_list,
|
||||
|
@ -1624,6 +1622,8 @@ const struct rig_caps ic905_caps =
|
|||
|
||||
.chan_list = {
|
||||
{ 1, 99, RIG_MTYPE_MEM },
|
||||
{ 1, 8, RIG_MTYPE_VOICE },
|
||||
{ 1, 8, RIG_MTYPE_MORSE },
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
|
@ -1924,6 +1924,7 @@ int ic7300_get_parm(RIG *rig, setting_t parm, value_t *val)
|
|||
switch (parm)
|
||||
{
|
||||
#if 0
|
||||
|
||||
case RIG_PARM_ANN:
|
||||
return -RIG_ENIMPL; // How can we implement this?
|
||||
#endif
|
||||
|
@ -1956,6 +1957,7 @@ int ic7300_get_parm(RIG *rig, setting_t parm, value_t *val)
|
|||
{
|
||||
|
||||
#if 0
|
||||
|
||||
case RIG_PARM_ANN:
|
||||
rig_debug(RIG_DEBUG_WARN, "%s: not implemented\n", __func__);
|
||||
return -RIG_ENIMPL;
|
||||
|
@ -2050,10 +2052,12 @@ int ic7300_get_clock(RIG *rig, int *year, int *month, int *day, int *hour,
|
|||
prmbuf[0] = 0x00;
|
||||
prmbuf[1] = 0x95;
|
||||
retval = icom_transaction(rig, cmd, subcmd, prmbuf, 2, respbuf, &resplen);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
return retval;
|
||||
}
|
||||
|
||||
*hour = from_bcd(&respbuf[4], 2);
|
||||
*min = from_bcd(&respbuf[5], 2);
|
||||
*sec = 0;
|
||||
|
@ -2062,10 +2066,12 @@ int ic7300_get_clock(RIG *rig, int *year, int *month, int *day, int *hour,
|
|||
prmbuf[0] = 0x00;
|
||||
prmbuf[1] = 0x96;
|
||||
retval = icom_transaction(rig, cmd, subcmd, prmbuf, 2, respbuf, &resplen);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
return retval;
|
||||
}
|
||||
|
||||
*utc_offset = from_bcd(&respbuf[4], 2) * 100;
|
||||
*utc_offset += from_bcd(&respbuf[5], 2);
|
||||
|
||||
|
@ -2158,10 +2164,12 @@ int ic9700_get_clock(RIG *rig, int *year, int *month, int *day, int *hour,
|
|||
prmbuf[0] = 0x01;
|
||||
prmbuf[1] = 0x80;
|
||||
retval = icom_transaction(rig, cmd, subcmd, prmbuf, 2, respbuf, &resplen);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
return retval;
|
||||
}
|
||||
|
||||
*hour = from_bcd(&respbuf[4], 2);
|
||||
*min = from_bcd(&respbuf[5], 2);
|
||||
*sec = 0;
|
||||
|
@ -2170,10 +2178,12 @@ int ic9700_get_clock(RIG *rig, int *year, int *month, int *day, int *hour,
|
|||
prmbuf[0] = 0x01;
|
||||
prmbuf[1] = 0x84;
|
||||
retval = icom_transaction(rig, cmd, subcmd, prmbuf, 2, respbuf, &resplen);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
return retval;
|
||||
}
|
||||
|
||||
*utc_offset = from_bcd(&respbuf[4], 2) * 100;
|
||||
*utc_offset += from_bcd(&respbuf[5], 2);
|
||||
|
||||
|
@ -2193,11 +2203,30 @@ int ic9700_set_vfo(RIG *rig, vfo_t vfo)
|
|||
unsigned char ackbuf[MAXFRAMELEN];
|
||||
int ack_len = sizeof(ackbuf);
|
||||
int retval;
|
||||
int vfo_is_main_or_sub = (vfo == RIG_VFO_MAIN) || (vfo == RIG_VFO_SUB);
|
||||
|
||||
ENTERFUNC;
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __func__, rig_strvfo(vfo));
|
||||
|
||||
if (rig->state.cache.satmode && !vfo_is_main_or_sub)
|
||||
{
|
||||
// Translate VFO A/B to Main/Sub in satellite mode
|
||||
if (vfo == RIG_VFO_A)
|
||||
{
|
||||
vfo = RIG_VFO_MAIN;
|
||||
}
|
||||
else if (vfo == RIG_VFO_B)
|
||||
{
|
||||
vfo = RIG_VFO_SUB;
|
||||
}
|
||||
else
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: Invalid VFO %s in satellite mode\n", __func__, rig_strvfo(vfo));
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
if (vfo == RIG_VFO_A)
|
||||
{
|
||||
retval = icom_transaction(rig, C_SET_VFO, S_VFOA, NULL, 0, ackbuf, &ack_len);
|
||||
|
@ -2206,7 +2235,8 @@ int ic9700_set_vfo(RIG *rig, vfo_t vfo)
|
|||
{
|
||||
if (rig->state.cache.satmode)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_WARN, "%s: cannot switch to VFOB when in satmode\n", __func__);
|
||||
rig_debug(RIG_DEBUG_WARN, "%s: cannot switch to VFOB when in satmode\n",
|
||||
__func__);
|
||||
// we return RIG_OK anyways as this should just be a bad request
|
||||
return RIG_OK;
|
||||
}
|
||||
|
@ -2260,6 +2290,10 @@ int ic9700_set_vfo(RIG *rig, vfo_t vfo)
|
|||
retval = icom_transaction(rig, C_SET_VFO, subcmd, NULL, 0, ackbuf, &ack_len);
|
||||
}
|
||||
}
|
||||
else if (vfo == RIG_VFO_MEM)
|
||||
{
|
||||
return icom_set_vfo(rig, vfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Unsupported VFO
|
||||
|
|
|
@ -51,7 +51,7 @@ static const struct icom_priv_caps ic735_priv_caps =
|
|||
ic737_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic735_caps =
|
||||
struct rig_caps ic735_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC735),
|
||||
.model_name = "IC-735",
|
||||
|
|
|
@ -58,7 +58,7 @@ static const struct icom_priv_caps ic736_priv_caps =
|
|||
ic737_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic736_caps =
|
||||
struct rig_caps ic736_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC736),
|
||||
.model_name = "IC-736",
|
||||
|
|
|
@ -56,7 +56,7 @@ static const struct icom_priv_caps ic737_priv_caps =
|
|||
.ant_count = 2
|
||||
};
|
||||
|
||||
const struct rig_caps ic737_caps =
|
||||
struct rig_caps ic737_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC737),
|
||||
.model_name = "IC-737",
|
||||
|
|
|
@ -58,7 +58,7 @@ static const struct icom_priv_caps ic738_priv_caps =
|
|||
ic737_ts_sc_list
|
||||
};
|
||||
|
||||
const struct rig_caps ic738_caps =
|
||||
struct rig_caps ic738_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC738),
|
||||
.model_name = "IC-738",
|
||||
|
|
|
@ -119,7 +119,7 @@ static const struct icom_priv_caps ic7410_priv_caps =
|
|||
};
|
||||
|
||||
|
||||
const struct rig_caps ic7410_caps =
|
||||
struct rig_caps ic7410_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC7410),
|
||||
.model_name = "IC-7410",
|
||||
|
@ -150,8 +150,6 @@ const struct rig_caps ic7410_caps =
|
|||
.level_gran =
|
||||
{
|
||||
#include "level_gran_icom.h"
|
||||
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } },
|
||||
[LVL_VOXDELAY] = { .min = { .i = 0 }, .max = { .i = 20 }, .step = { .i = 1 } },
|
||||
[LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } },
|
||||
[LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } },
|
||||
},
|
||||
|
|
|
@ -176,7 +176,7 @@ static const struct icom_priv_caps ic746_priv_caps =
|
|||
},
|
||||
};
|
||||
|
||||
const struct rig_caps ic746_caps =
|
||||
struct rig_caps ic746_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC746),
|
||||
.model_name = "IC-746",
|
||||
|
@ -207,7 +207,6 @@ const struct rig_caps ic746_caps =
|
|||
.level_gran =
|
||||
{
|
||||
#include "level_gran_icom.h"
|
||||
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } },
|
||||
[LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } },
|
||||
[LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } },
|
||||
},
|
||||
|
@ -412,7 +411,7 @@ static const struct icom_priv_caps ic746pro_priv_caps =
|
|||
},
|
||||
};
|
||||
|
||||
const struct rig_caps ic746pro_caps =
|
||||
struct rig_caps ic746pro_caps =
|
||||
{
|
||||
RIG_MODEL(RIG_MODEL_IC746PRO),
|
||||
.model_name = "IC-746PRO",
|
||||
|
@ -443,7 +442,6 @@ const struct rig_caps ic746pro_caps =
|
|||
.level_gran =
|
||||
{
|
||||
#include "level_gran_icom.h"
|
||||
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } },
|
||||
},
|
||||
.parm_gran = {
|
||||
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Ładowanie…
Reference in New Issue