hamlib 0.1.27 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/binding.gyp +18 -85
- package/index.d.ts +259 -4
- package/lib/index.js +234 -0
- package/package.json +1 -1
- package/prebuilds/darwin-arm64/libhamlib.4.dylib +0 -0
- package/prebuilds/darwin-arm64/node.napi.node +0 -0
- package/prebuilds/darwin-x64/libhamlib.4.dylib +0 -0
- package/prebuilds/darwin-x64/node.napi.node +0 -0
- package/prebuilds/linux-arm64/libhamlib.so +0 -0
- package/prebuilds/linux-arm64/libhamlib.so.4 +0 -0
- package/prebuilds/linux-arm64/libhamlib.so.4.0.7 +0 -0
- package/prebuilds/linux-arm64/node.napi.node +0 -0
- package/prebuilds/linux-x64/libhamlib.so +0 -0
- package/prebuilds/linux-x64/libhamlib.so.4 +0 -0
- package/prebuilds/linux-x64/libhamlib.so.4.0.7 +0 -0
- package/prebuilds/linux-x64/node.napi.node +0 -0
- package/prebuilds/win32-x64/hamlib_shim.dll +0 -0
- package/prebuilds/win32-x64/libhamlib-4.dll +0 -0
- package/prebuilds/win32-x64/node.napi.node +0 -0
- package/src/addon.cpp +2 -2
- package/src/hamlib.cpp +1868 -1126
- package/src/hamlib.h +79 -37
- package/src/shim/hamlib_shim.c +1169 -0
- package/src/shim/hamlib_shim.h +601 -0
- package/prebuilds/BUILD_INFO.txt +0 -14
- package/src/hamlib_compat.h +0 -44
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hamlib_shim.h - Pure C interface layer for Hamlib
|
|
3
|
+
*
|
|
4
|
+
* This shim provides a compiler-safe C ABI boundary between the Node.js
|
|
5
|
+
* native addon (compiled with MSVC on Windows) and the Hamlib library
|
|
6
|
+
* (compiled with MinGW on Windows).
|
|
7
|
+
*
|
|
8
|
+
* On Linux/macOS: compiled as static library (.a), linked into addon
|
|
9
|
+
* On Windows: compiled as DLL (MinGW), loaded by addon (MSVC)
|
|
10
|
+
*
|
|
11
|
+
* All Hamlib struct access is encapsulated here to avoid cross-compiler
|
|
12
|
+
* struct layout differences.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
#ifndef HAMLIB_SHIM_H
|
|
16
|
+
#define HAMLIB_SHIM_H
|
|
17
|
+
|
|
18
|
+
#include <stdint.h>
|
|
19
|
+
|
|
20
|
+
#ifdef __cplusplus
|
|
21
|
+
extern "C" {
|
|
22
|
+
#endif
|
|
23
|
+
|
|
24
|
+
/* DLL export/import macros */
|
|
25
|
+
#ifdef _WIN32
|
|
26
|
+
#ifdef HAMLIB_SHIM_BUILD
|
|
27
|
+
#define SHIM_API __declspec(dllexport)
|
|
28
|
+
#else
|
|
29
|
+
#define SHIM_API __declspec(dllimport)
|
|
30
|
+
#endif
|
|
31
|
+
#else
|
|
32
|
+
#define SHIM_API
|
|
33
|
+
#endif
|
|
34
|
+
|
|
35
|
+
/* Opaque handle type - hides RIG* from the addon */
|
|
36
|
+
typedef void* hamlib_shim_handle_t;
|
|
37
|
+
|
|
38
|
+
/* ===== Constants (mirror Hamlib values) ===== */
|
|
39
|
+
|
|
40
|
+
/* Return codes */
|
|
41
|
+
#define SHIM_RIG_OK 0
|
|
42
|
+
#define SHIM_RIG_EINVAL -1
|
|
43
|
+
#define SHIM_RIG_EIO -2
|
|
44
|
+
#define SHIM_RIG_ENIMPL -3
|
|
45
|
+
#define SHIM_RIG_ETIMEOUT -4
|
|
46
|
+
#define SHIM_RIG_ENAVAIL -11
|
|
47
|
+
#define SHIM_RIG_EPROTO -8
|
|
48
|
+
|
|
49
|
+
/* VFO constants */
|
|
50
|
+
#define SHIM_RIG_VFO_NONE 0
|
|
51
|
+
#define SHIM_RIG_VFO_CURR ((int)0x40000000) /* RIG_VFO_CURR */
|
|
52
|
+
#define SHIM_RIG_VFO_MEM ((int)0x10000000) /* RIG_VFO_MEM */
|
|
53
|
+
#define SHIM_RIG_VFO_A ((int)(1<<0)) /* RIG_VFO_A */
|
|
54
|
+
#define SHIM_RIG_VFO_B ((int)(1<<1)) /* RIG_VFO_B */
|
|
55
|
+
|
|
56
|
+
/* Mode constants */
|
|
57
|
+
#define SHIM_RIG_MODE_NONE 0
|
|
58
|
+
|
|
59
|
+
/* Split constants */
|
|
60
|
+
#define SHIM_RIG_SPLIT_OFF 0
|
|
61
|
+
#define SHIM_RIG_SPLIT_ON 1
|
|
62
|
+
|
|
63
|
+
/* PTT constants */
|
|
64
|
+
#define SHIM_RIG_PTT_OFF 0
|
|
65
|
+
#define SHIM_RIG_PTT_ON 1
|
|
66
|
+
|
|
67
|
+
/* DCD constants */
|
|
68
|
+
#define SHIM_RIG_DCD_OFF 0
|
|
69
|
+
#define SHIM_RIG_DCD_ON 1
|
|
70
|
+
|
|
71
|
+
/* Passband constants */
|
|
72
|
+
#define SHIM_RIG_PASSBAND_NORMAL 0
|
|
73
|
+
|
|
74
|
+
/* Port types */
|
|
75
|
+
#define SHIM_RIG_PORT_SERIAL 0
|
|
76
|
+
#define SHIM_RIG_PORT_NETWORK 4
|
|
77
|
+
|
|
78
|
+
/* Scan types */
|
|
79
|
+
#define SHIM_RIG_SCAN_STOP 0
|
|
80
|
+
#define SHIM_RIG_SCAN_MEM 1
|
|
81
|
+
#define SHIM_RIG_SCAN_VFO (1<<1)
|
|
82
|
+
#define SHIM_RIG_SCAN_PROG (1<<2)
|
|
83
|
+
#define SHIM_RIG_SCAN_DELTA (1<<3)
|
|
84
|
+
#define SHIM_RIG_SCAN_PRIO (1<<4)
|
|
85
|
+
|
|
86
|
+
/* Parm constants (bit positions for setting_t / uint64_t) */
|
|
87
|
+
#define SHIM_RIG_PARM_ANN (1ULL << 0)
|
|
88
|
+
#define SHIM_RIG_PARM_APO (1ULL << 1)
|
|
89
|
+
#define SHIM_RIG_PARM_BACKLIGHT (1ULL << 2)
|
|
90
|
+
#define SHIM_RIG_PARM_BEEP (1ULL << 4)
|
|
91
|
+
#define SHIM_RIG_PARM_TIME (1ULL << 5)
|
|
92
|
+
#define SHIM_RIG_PARM_BAT (1ULL << 6)
|
|
93
|
+
#define SHIM_RIG_PARM_KEYLIGHT (1ULL << 7)
|
|
94
|
+
#define SHIM_RIG_PARM_SCREENSAVER (1ULL << 8)
|
|
95
|
+
|
|
96
|
+
/* Transceive mode */
|
|
97
|
+
#define SHIM_RIG_TRN_POLL 1
|
|
98
|
+
|
|
99
|
+
/* Power status */
|
|
100
|
+
#define SHIM_RIG_POWER_UNKNOWN -1
|
|
101
|
+
|
|
102
|
+
/* PTT types (for port config) */
|
|
103
|
+
#define SHIM_RIG_PTT_NONE 0
|
|
104
|
+
#define SHIM_RIG_PTT_RIG 1
|
|
105
|
+
#define SHIM_RIG_PTT_SERIAL_DTR 2
|
|
106
|
+
#define SHIM_RIG_PTT_SERIAL_RTS 3
|
|
107
|
+
#define SHIM_RIG_PTT_PARALLEL 4
|
|
108
|
+
#define SHIM_RIG_PTT_CM108 8
|
|
109
|
+
#define SHIM_RIG_PTT_GPIO 16
|
|
110
|
+
#define SHIM_RIG_PTT_GPION 32
|
|
111
|
+
|
|
112
|
+
/* DCD types (for port config) */
|
|
113
|
+
#define SHIM_RIG_DCD_NONE 0
|
|
114
|
+
#define SHIM_RIG_DCD_RIG 1
|
|
115
|
+
#define SHIM_RIG_DCD_SERIAL_DSR 2
|
|
116
|
+
#define SHIM_RIG_DCD_SERIAL_CTS 3
|
|
117
|
+
#define SHIM_RIG_DCD_SERIAL_CAR 4
|
|
118
|
+
#define SHIM_RIG_DCD_PARALLEL 5
|
|
119
|
+
#define SHIM_RIG_DCD_CM108 8
|
|
120
|
+
#define SHIM_RIG_DCD_GPIO 16
|
|
121
|
+
#define SHIM_RIG_DCD_GPION 32
|
|
122
|
+
|
|
123
|
+
/* Serial parity */
|
|
124
|
+
#define SHIM_RIG_PARITY_NONE 0
|
|
125
|
+
#define SHIM_RIG_PARITY_ODD 1
|
|
126
|
+
#define SHIM_RIG_PARITY_EVEN 2
|
|
127
|
+
|
|
128
|
+
/* Serial handshake */
|
|
129
|
+
#define SHIM_RIG_HANDSHAKE_NONE 0
|
|
130
|
+
#define SHIM_RIG_HANDSHAKE_XONXOFF 1
|
|
131
|
+
#define SHIM_RIG_HANDSHAKE_HARDWARE 2
|
|
132
|
+
|
|
133
|
+
/* Serial control state */
|
|
134
|
+
#define SHIM_RIG_SIGNAL_UNSET 0
|
|
135
|
+
#define SHIM_RIG_SIGNAL_ON 1
|
|
136
|
+
#define SHIM_RIG_SIGNAL_OFF 2
|
|
137
|
+
|
|
138
|
+
/* Repeater shift */
|
|
139
|
+
#define SHIM_RIG_RPT_SHIFT_NONE 0
|
|
140
|
+
|
|
141
|
+
/* Reset types */
|
|
142
|
+
#define SHIM_RIG_RESET_NONE 0
|
|
143
|
+
#define SHIM_RIG_RESET_SOFT 1
|
|
144
|
+
#define SHIM_RIG_RESET_VFO 2
|
|
145
|
+
#define SHIM_RIG_RESET_MCALL 4
|
|
146
|
+
#define SHIM_RIG_RESET_MASTER 8
|
|
147
|
+
|
|
148
|
+
/* Antenna */
|
|
149
|
+
#define SHIM_RIG_ANT_CURR 0
|
|
150
|
+
|
|
151
|
+
/* Rig type mask and types */
|
|
152
|
+
#define SHIM_RIG_TYPE_MASK 0x7F000000
|
|
153
|
+
|
|
154
|
+
/* Max path length */
|
|
155
|
+
#define SHIM_HAMLIB_FILPATHLEN 512
|
|
156
|
+
|
|
157
|
+
/* Max modes for iteration */
|
|
158
|
+
#define SHIM_HAMLIB_MAX_MODES 64
|
|
159
|
+
|
|
160
|
+
/* ===== Level constants (bit positions for setting_t / uint64_t) ===== */
|
|
161
|
+
#define SHIM_RIG_LEVEL_PREAMP (1ULL << 0)
|
|
162
|
+
#define SHIM_RIG_LEVEL_ATT (1ULL << 1)
|
|
163
|
+
#define SHIM_RIG_LEVEL_VOXDELAY (1ULL << 2)
|
|
164
|
+
#define SHIM_RIG_LEVEL_AF (1ULL << 3)
|
|
165
|
+
#define SHIM_RIG_LEVEL_RF (1ULL << 4)
|
|
166
|
+
#define SHIM_RIG_LEVEL_SQL (1ULL << 5)
|
|
167
|
+
#define SHIM_RIG_LEVEL_IF (1ULL << 6)
|
|
168
|
+
#define SHIM_RIG_LEVEL_APF (1ULL << 7)
|
|
169
|
+
#define SHIM_RIG_LEVEL_NR (1ULL << 8)
|
|
170
|
+
#define SHIM_RIG_LEVEL_PBT_IN (1ULL << 9)
|
|
171
|
+
#define SHIM_RIG_LEVEL_PBT_OUT (1ULL << 10)
|
|
172
|
+
#define SHIM_RIG_LEVEL_CWPITCH (1ULL << 11)
|
|
173
|
+
#define SHIM_RIG_LEVEL_RFPOWER (1ULL << 12)
|
|
174
|
+
#define SHIM_RIG_LEVEL_MICGAIN (1ULL << 13)
|
|
175
|
+
#define SHIM_RIG_LEVEL_KEYSPD (1ULL << 14)
|
|
176
|
+
#define SHIM_RIG_LEVEL_NOTCHF (1ULL << 15)
|
|
177
|
+
#define SHIM_RIG_LEVEL_COMP (1ULL << 16)
|
|
178
|
+
#define SHIM_RIG_LEVEL_AGC (1ULL << 17)
|
|
179
|
+
#define SHIM_RIG_LEVEL_BKINDL (1ULL << 18)
|
|
180
|
+
#define SHIM_RIG_LEVEL_BALANCE (1ULL << 19)
|
|
181
|
+
#define SHIM_RIG_LEVEL_METER (1ULL << 20)
|
|
182
|
+
#define SHIM_RIG_LEVEL_VOXGAIN (1ULL << 21)
|
|
183
|
+
#define SHIM_RIG_LEVEL_ANTIVOX (1ULL << 22)
|
|
184
|
+
#define SHIM_RIG_LEVEL_STRENGTH (1ULL << 26)
|
|
185
|
+
#define SHIM_RIG_LEVEL_RAWSTR (1ULL << 28)
|
|
186
|
+
#define SHIM_RIG_LEVEL_SWR (1ULL << 29)
|
|
187
|
+
#define SHIM_RIG_LEVEL_ALC (1ULL << 30)
|
|
188
|
+
#define SHIM_RIG_LEVEL_RFPOWER_METER (1ULL << 33)
|
|
189
|
+
#define SHIM_RIG_LEVEL_COMP_METER (1ULL << 34)
|
|
190
|
+
#define SHIM_RIG_LEVEL_VD_METER (1ULL << 35)
|
|
191
|
+
#define SHIM_RIG_LEVEL_ID_METER (1ULL << 36)
|
|
192
|
+
#define SHIM_RIG_LEVEL_TEMP_METER (1ULL << 42)
|
|
193
|
+
|
|
194
|
+
/* ===== Function constants (bit positions for setting_t / uint64_t) ===== */
|
|
195
|
+
#define SHIM_RIG_FUNC_FAGC (1ULL << 0)
|
|
196
|
+
#define SHIM_RIG_FUNC_NB (1ULL << 1)
|
|
197
|
+
#define SHIM_RIG_FUNC_COMP (1ULL << 2)
|
|
198
|
+
#define SHIM_RIG_FUNC_VOX (1ULL << 3)
|
|
199
|
+
#define SHIM_RIG_FUNC_TONE (1ULL << 4)
|
|
200
|
+
#define SHIM_RIG_FUNC_TSQL (1ULL << 5)
|
|
201
|
+
#define SHIM_RIG_FUNC_SBKIN (1ULL << 6)
|
|
202
|
+
#define SHIM_RIG_FUNC_FBKIN (1ULL << 7)
|
|
203
|
+
#define SHIM_RIG_FUNC_ANF (1ULL << 8)
|
|
204
|
+
#define SHIM_RIG_FUNC_NR (1ULL << 9)
|
|
205
|
+
#define SHIM_RIG_FUNC_AIP (1ULL << 10)
|
|
206
|
+
#define SHIM_RIG_FUNC_APF (1ULL << 11)
|
|
207
|
+
#define SHIM_RIG_FUNC_MON (1ULL << 12)
|
|
208
|
+
#define SHIM_RIG_FUNC_MN (1ULL << 13)
|
|
209
|
+
#define SHIM_RIG_FUNC_RF (1ULL << 14)
|
|
210
|
+
#define SHIM_RIG_FUNC_ARO (1ULL << 15)
|
|
211
|
+
#define SHIM_RIG_FUNC_LOCK (1ULL << 16)
|
|
212
|
+
#define SHIM_RIG_FUNC_MUTE (1ULL << 17)
|
|
213
|
+
#define SHIM_RIG_FUNC_VSC (1ULL << 18)
|
|
214
|
+
#define SHIM_RIG_FUNC_REV (1ULL << 19)
|
|
215
|
+
#define SHIM_RIG_FUNC_SQL (1ULL << 20)
|
|
216
|
+
#define SHIM_RIG_FUNC_ABM (1ULL << 21)
|
|
217
|
+
#define SHIM_RIG_FUNC_BC (1ULL << 22)
|
|
218
|
+
#define SHIM_RIG_FUNC_MBC (1ULL << 23)
|
|
219
|
+
#define SHIM_RIG_FUNC_RIT (1ULL << 24)
|
|
220
|
+
#define SHIM_RIG_FUNC_AFC (1ULL << 25)
|
|
221
|
+
#define SHIM_RIG_FUNC_SATMODE (1ULL << 26)
|
|
222
|
+
#define SHIM_RIG_FUNC_SCOPE (1ULL << 27)
|
|
223
|
+
#define SHIM_RIG_FUNC_RESUME (1ULL << 28)
|
|
224
|
+
#define SHIM_RIG_FUNC_TBURST (1ULL << 29)
|
|
225
|
+
#define SHIM_RIG_FUNC_TUNER (1ULL << 30)
|
|
226
|
+
#define SHIM_RIG_FUNC_XIT (1ULL << 31)
|
|
227
|
+
|
|
228
|
+
/* ===== VFO operation constants ===== */
|
|
229
|
+
#define SHIM_RIG_OP_CPY (1<<0)
|
|
230
|
+
#define SHIM_RIG_OP_XCHG (1<<1)
|
|
231
|
+
#define SHIM_RIG_OP_FROM_VFO (1<<2)
|
|
232
|
+
#define SHIM_RIG_OP_TO_VFO (1<<3)
|
|
233
|
+
#define SHIM_RIG_OP_MCL (1<<4)
|
|
234
|
+
#define SHIM_RIG_OP_UP (1<<5)
|
|
235
|
+
#define SHIM_RIG_OP_DOWN (1<<6)
|
|
236
|
+
#define SHIM_RIG_OP_BAND_UP (1<<7)
|
|
237
|
+
#define SHIM_RIG_OP_BAND_DOWN (1<<8)
|
|
238
|
+
#define SHIM_RIG_OP_LEFT (1<<9)
|
|
239
|
+
#define SHIM_RIG_OP_RIGHT (1<<10)
|
|
240
|
+
#define SHIM_RIG_OP_TUNE (1<<11)
|
|
241
|
+
#define SHIM_RIG_OP_TOGGLE (1<<12)
|
|
242
|
+
|
|
243
|
+
/* ===== Repeater shift constants ===== */
|
|
244
|
+
#define SHIM_RIG_RPT_SHIFT_MINUS 1
|
|
245
|
+
#define SHIM_RIG_RPT_SHIFT_PLUS 2
|
|
246
|
+
|
|
247
|
+
/* ===== Simplified structs for cross-compiler safety ===== */
|
|
248
|
+
|
|
249
|
+
/* Simplified channel data for set/get memory channel */
|
|
250
|
+
typedef struct {
|
|
251
|
+
int channel_num;
|
|
252
|
+
double freq;
|
|
253
|
+
double tx_freq;
|
|
254
|
+
int mode; /* rmode_t as int */
|
|
255
|
+
int width; /* pbwidth_t as int */
|
|
256
|
+
int split; /* split_t as int */
|
|
257
|
+
int ctcss_tone;
|
|
258
|
+
int vfo;
|
|
259
|
+
char channel_desc[64];
|
|
260
|
+
} shim_channel_t;
|
|
261
|
+
|
|
262
|
+
/* Rig info for rig list enumeration */
|
|
263
|
+
typedef struct {
|
|
264
|
+
unsigned int rig_model;
|
|
265
|
+
const char* model_name;
|
|
266
|
+
const char* mfg_name;
|
|
267
|
+
const char* version;
|
|
268
|
+
int status;
|
|
269
|
+
int rig_type;
|
|
270
|
+
} shim_rig_info_t;
|
|
271
|
+
|
|
272
|
+
/* ===== Callback types ===== */
|
|
273
|
+
|
|
274
|
+
/* Frequency change callback: (handle, vfo, freq, arg) -> int */
|
|
275
|
+
typedef int (*shim_freq_cb_t)(void* handle, int vfo, double freq, void* arg);
|
|
276
|
+
|
|
277
|
+
/* PTT change callback: (handle, vfo, ptt, arg) -> int */
|
|
278
|
+
typedef int (*shim_ptt_cb_t)(void* handle, int vfo, int ptt, void* arg);
|
|
279
|
+
|
|
280
|
+
/* Rig list callback: (info, data) -> int */
|
|
281
|
+
typedef int (*shim_rig_list_cb_t)(const shim_rig_info_t* info, void* data);
|
|
282
|
+
|
|
283
|
+
/* ===== Lifecycle functions ===== */
|
|
284
|
+
|
|
285
|
+
SHIM_API hamlib_shim_handle_t shim_rig_init(unsigned int model);
|
|
286
|
+
SHIM_API int shim_rig_open(hamlib_shim_handle_t h);
|
|
287
|
+
SHIM_API int shim_rig_close(hamlib_shim_handle_t h);
|
|
288
|
+
SHIM_API int shim_rig_cleanup(hamlib_shim_handle_t h);
|
|
289
|
+
SHIM_API const char* shim_rigerror(int errcode);
|
|
290
|
+
|
|
291
|
+
/* ===== Debug / Utility ===== */
|
|
292
|
+
|
|
293
|
+
SHIM_API void shim_rig_set_debug(int level);
|
|
294
|
+
SHIM_API int shim_rig_get_debug(void);
|
|
295
|
+
SHIM_API const char* shim_rig_get_version(void);
|
|
296
|
+
SHIM_API int shim_rig_load_all_backends(void);
|
|
297
|
+
SHIM_API int shim_rig_list_foreach(shim_rig_list_cb_t cb, void* data);
|
|
298
|
+
SHIM_API const char* shim_rig_strstatus(int status);
|
|
299
|
+
|
|
300
|
+
/* ===== Port configuration (before open) ===== */
|
|
301
|
+
|
|
302
|
+
SHIM_API void shim_rig_set_port_path(hamlib_shim_handle_t h, const char* path);
|
|
303
|
+
SHIM_API void shim_rig_set_port_type(hamlib_shim_handle_t h, int type);
|
|
304
|
+
|
|
305
|
+
/* Serial port configuration */
|
|
306
|
+
SHIM_API void shim_rig_set_serial_rate(hamlib_shim_handle_t h, int rate);
|
|
307
|
+
SHIM_API int shim_rig_get_serial_rate(hamlib_shim_handle_t h);
|
|
308
|
+
|
|
309
|
+
SHIM_API void shim_rig_set_serial_data_bits(hamlib_shim_handle_t h, int bits);
|
|
310
|
+
SHIM_API int shim_rig_get_serial_data_bits(hamlib_shim_handle_t h);
|
|
311
|
+
|
|
312
|
+
SHIM_API void shim_rig_set_serial_stop_bits(hamlib_shim_handle_t h, int bits);
|
|
313
|
+
SHIM_API int shim_rig_get_serial_stop_bits(hamlib_shim_handle_t h);
|
|
314
|
+
|
|
315
|
+
SHIM_API void shim_rig_set_serial_parity(hamlib_shim_handle_t h, int parity);
|
|
316
|
+
SHIM_API int shim_rig_get_serial_parity(hamlib_shim_handle_t h);
|
|
317
|
+
|
|
318
|
+
SHIM_API void shim_rig_set_serial_handshake(hamlib_shim_handle_t h, int handshake);
|
|
319
|
+
SHIM_API int shim_rig_get_serial_handshake(hamlib_shim_handle_t h);
|
|
320
|
+
|
|
321
|
+
SHIM_API void shim_rig_set_serial_rts_state(hamlib_shim_handle_t h, int state);
|
|
322
|
+
SHIM_API int shim_rig_get_serial_rts_state(hamlib_shim_handle_t h);
|
|
323
|
+
|
|
324
|
+
SHIM_API void shim_rig_set_serial_dtr_state(hamlib_shim_handle_t h, int state);
|
|
325
|
+
SHIM_API int shim_rig_get_serial_dtr_state(hamlib_shim_handle_t h);
|
|
326
|
+
|
|
327
|
+
/* Port timing configuration */
|
|
328
|
+
SHIM_API void shim_rig_set_port_timeout(hamlib_shim_handle_t h, int ms);
|
|
329
|
+
SHIM_API int shim_rig_get_port_timeout(hamlib_shim_handle_t h);
|
|
330
|
+
|
|
331
|
+
SHIM_API void shim_rig_set_port_retry(hamlib_shim_handle_t h, int count);
|
|
332
|
+
SHIM_API int shim_rig_get_port_retry(hamlib_shim_handle_t h);
|
|
333
|
+
|
|
334
|
+
SHIM_API void shim_rig_set_port_write_delay(hamlib_shim_handle_t h, int ms);
|
|
335
|
+
SHIM_API int shim_rig_get_port_write_delay(hamlib_shim_handle_t h);
|
|
336
|
+
|
|
337
|
+
SHIM_API void shim_rig_set_port_post_write_delay(hamlib_shim_handle_t h, int ms);
|
|
338
|
+
SHIM_API int shim_rig_get_port_post_write_delay(hamlib_shim_handle_t h);
|
|
339
|
+
|
|
340
|
+
SHIM_API void shim_rig_set_port_flushx(hamlib_shim_handle_t h, int enable);
|
|
341
|
+
SHIM_API int shim_rig_get_port_flushx(hamlib_shim_handle_t h);
|
|
342
|
+
|
|
343
|
+
/* PTT/DCD port type configuration */
|
|
344
|
+
SHIM_API void shim_rig_set_ptt_type(hamlib_shim_handle_t h, int type);
|
|
345
|
+
SHIM_API int shim_rig_get_ptt_type(hamlib_shim_handle_t h);
|
|
346
|
+
|
|
347
|
+
SHIM_API void shim_rig_set_dcd_type(hamlib_shim_handle_t h, int type);
|
|
348
|
+
SHIM_API int shim_rig_get_dcd_type(hamlib_shim_handle_t h);
|
|
349
|
+
|
|
350
|
+
/* ===== Frequency control ===== */
|
|
351
|
+
|
|
352
|
+
SHIM_API int shim_rig_set_freq(hamlib_shim_handle_t h, int vfo, double freq);
|
|
353
|
+
SHIM_API int shim_rig_get_freq(hamlib_shim_handle_t h, int vfo, double* freq);
|
|
354
|
+
|
|
355
|
+
/* ===== VFO control ===== */
|
|
356
|
+
|
|
357
|
+
SHIM_API int shim_rig_set_vfo(hamlib_shim_handle_t h, int vfo);
|
|
358
|
+
SHIM_API int shim_rig_get_vfo(hamlib_shim_handle_t h, int* vfo);
|
|
359
|
+
|
|
360
|
+
/* ===== Mode control ===== */
|
|
361
|
+
|
|
362
|
+
SHIM_API int shim_rig_set_mode(hamlib_shim_handle_t h, int vfo, int mode, int width);
|
|
363
|
+
SHIM_API int shim_rig_get_mode(hamlib_shim_handle_t h, int vfo, int* mode, int* width);
|
|
364
|
+
SHIM_API int shim_rig_parse_mode(const char* mode_str);
|
|
365
|
+
SHIM_API const char* shim_rig_strrmode(int mode);
|
|
366
|
+
SHIM_API int shim_rig_passband_narrow(hamlib_shim_handle_t h, int mode);
|
|
367
|
+
SHIM_API int shim_rig_passband_wide(hamlib_shim_handle_t h, int mode);
|
|
368
|
+
|
|
369
|
+
/* ===== PTT control ===== */
|
|
370
|
+
|
|
371
|
+
SHIM_API int shim_rig_set_ptt(hamlib_shim_handle_t h, int vfo, int ptt);
|
|
372
|
+
SHIM_API int shim_rig_get_ptt(hamlib_shim_handle_t h, int vfo, int* ptt);
|
|
373
|
+
SHIM_API int shim_rig_get_dcd(hamlib_shim_handle_t h, int vfo, int* dcd);
|
|
374
|
+
|
|
375
|
+
/* ===== Signal strength ===== */
|
|
376
|
+
|
|
377
|
+
SHIM_API int shim_rig_get_strength(hamlib_shim_handle_t h, int vfo, int* strength);
|
|
378
|
+
|
|
379
|
+
/* ===== Level control ===== */
|
|
380
|
+
|
|
381
|
+
SHIM_API int shim_rig_set_level_f(hamlib_shim_handle_t h, int vfo, uint64_t level, float value);
|
|
382
|
+
SHIM_API int shim_rig_set_level_i(hamlib_shim_handle_t h, int vfo, uint64_t level, int value);
|
|
383
|
+
SHIM_API int shim_rig_get_level_f(hamlib_shim_handle_t h, int vfo, uint64_t level, float* value);
|
|
384
|
+
SHIM_API int shim_rig_get_level_i(hamlib_shim_handle_t h, int vfo, uint64_t level, int* value);
|
|
385
|
+
|
|
386
|
+
/* ===== Function control ===== */
|
|
387
|
+
|
|
388
|
+
SHIM_API int shim_rig_set_func(hamlib_shim_handle_t h, int vfo, uint64_t func, int enable);
|
|
389
|
+
SHIM_API int shim_rig_get_func(hamlib_shim_handle_t h, int vfo, uint64_t func, int* state);
|
|
390
|
+
|
|
391
|
+
/* ===== Parameter control ===== */
|
|
392
|
+
|
|
393
|
+
SHIM_API int shim_rig_set_parm_f(hamlib_shim_handle_t h, uint64_t parm, float value);
|
|
394
|
+
SHIM_API int shim_rig_set_parm_i(hamlib_shim_handle_t h, uint64_t parm, int value);
|
|
395
|
+
SHIM_API int shim_rig_get_parm_f(hamlib_shim_handle_t h, uint64_t parm, float* value);
|
|
396
|
+
SHIM_API int shim_rig_get_parm_i(hamlib_shim_handle_t h, uint64_t parm, int* value);
|
|
397
|
+
SHIM_API uint64_t shim_rig_parse_parm(const char* parm_str);
|
|
398
|
+
|
|
399
|
+
/* ===== Split operations ===== */
|
|
400
|
+
|
|
401
|
+
SHIM_API int shim_rig_set_split_freq(hamlib_shim_handle_t h, int vfo, double freq);
|
|
402
|
+
SHIM_API int shim_rig_get_split_freq(hamlib_shim_handle_t h, int vfo, double* freq);
|
|
403
|
+
|
|
404
|
+
SHIM_API int shim_rig_set_split_vfo(hamlib_shim_handle_t h, int rx_vfo, int split, int tx_vfo);
|
|
405
|
+
SHIM_API int shim_rig_get_split_vfo(hamlib_shim_handle_t h, int vfo, int* split, int* tx_vfo);
|
|
406
|
+
|
|
407
|
+
SHIM_API int shim_rig_set_split_mode(hamlib_shim_handle_t h, int vfo, int mode, int width);
|
|
408
|
+
SHIM_API int shim_rig_get_split_mode(hamlib_shim_handle_t h, int vfo, int* mode, int* width);
|
|
409
|
+
|
|
410
|
+
SHIM_API int shim_rig_set_split_freq_mode(hamlib_shim_handle_t h, int vfo, double freq, int mode, int width);
|
|
411
|
+
SHIM_API int shim_rig_get_split_freq_mode(hamlib_shim_handle_t h, int vfo, double* freq, int* mode, int* width);
|
|
412
|
+
|
|
413
|
+
/* ===== RIT/XIT control ===== */
|
|
414
|
+
|
|
415
|
+
SHIM_API int shim_rig_set_rit(hamlib_shim_handle_t h, int vfo, int offset);
|
|
416
|
+
SHIM_API int shim_rig_get_rit(hamlib_shim_handle_t h, int vfo, int* offset);
|
|
417
|
+
SHIM_API int shim_rig_set_xit(hamlib_shim_handle_t h, int vfo, int offset);
|
|
418
|
+
SHIM_API int shim_rig_get_xit(hamlib_shim_handle_t h, int vfo, int* offset);
|
|
419
|
+
|
|
420
|
+
/* ===== Memory channel operations ===== */
|
|
421
|
+
|
|
422
|
+
SHIM_API int shim_rig_set_channel(hamlib_shim_handle_t h, int vfo, const shim_channel_t* chan);
|
|
423
|
+
SHIM_API int shim_rig_get_channel(hamlib_shim_handle_t h, int vfo, shim_channel_t* chan, int read_only);
|
|
424
|
+
SHIM_API int shim_rig_set_mem(hamlib_shim_handle_t h, int vfo, int ch);
|
|
425
|
+
SHIM_API int shim_rig_get_mem(hamlib_shim_handle_t h, int vfo, int* ch);
|
|
426
|
+
SHIM_API int shim_rig_set_bank(hamlib_shim_handle_t h, int vfo, int bank);
|
|
427
|
+
SHIM_API int shim_rig_mem_count(hamlib_shim_handle_t h);
|
|
428
|
+
|
|
429
|
+
/* ===== Scanning ===== */
|
|
430
|
+
|
|
431
|
+
SHIM_API int shim_rig_scan(hamlib_shim_handle_t h, int vfo, int scan_type, int channel);
|
|
432
|
+
|
|
433
|
+
/* ===== VFO operations ===== */
|
|
434
|
+
|
|
435
|
+
SHIM_API int shim_rig_vfo_op(hamlib_shim_handle_t h, int vfo, int op);
|
|
436
|
+
|
|
437
|
+
/* ===== Antenna control ===== */
|
|
438
|
+
|
|
439
|
+
SHIM_API int shim_rig_set_ant(hamlib_shim_handle_t h, int vfo, int ant, float option);
|
|
440
|
+
SHIM_API int shim_rig_get_ant(hamlib_shim_handle_t h, int vfo, int ant, float* option,
|
|
441
|
+
int* ant_curr, int* ant_tx, int* ant_rx);
|
|
442
|
+
|
|
443
|
+
/* ===== Tuning step ===== */
|
|
444
|
+
|
|
445
|
+
SHIM_API int shim_rig_set_ts(hamlib_shim_handle_t h, int vfo, int ts);
|
|
446
|
+
SHIM_API int shim_rig_get_ts(hamlib_shim_handle_t h, int vfo, int* ts);
|
|
447
|
+
|
|
448
|
+
/* ===== Repeater control ===== */
|
|
449
|
+
|
|
450
|
+
SHIM_API int shim_rig_set_rptr_shift(hamlib_shim_handle_t h, int vfo, int shift);
|
|
451
|
+
SHIM_API int shim_rig_get_rptr_shift(hamlib_shim_handle_t h, int vfo, int* shift);
|
|
452
|
+
SHIM_API const char* shim_rig_strptrshift(int shift);
|
|
453
|
+
SHIM_API int shim_rig_set_rptr_offs(hamlib_shim_handle_t h, int vfo, int offset);
|
|
454
|
+
SHIM_API int shim_rig_get_rptr_offs(hamlib_shim_handle_t h, int vfo, int* offset);
|
|
455
|
+
|
|
456
|
+
/* ===== CTCSS/DCS tone control ===== */
|
|
457
|
+
|
|
458
|
+
SHIM_API int shim_rig_set_ctcss_tone(hamlib_shim_handle_t h, int vfo, unsigned int tone);
|
|
459
|
+
SHIM_API int shim_rig_get_ctcss_tone(hamlib_shim_handle_t h, int vfo, unsigned int* tone);
|
|
460
|
+
SHIM_API int shim_rig_set_dcs_code(hamlib_shim_handle_t h, int vfo, unsigned int code);
|
|
461
|
+
SHIM_API int shim_rig_get_dcs_code(hamlib_shim_handle_t h, int vfo, unsigned int* code);
|
|
462
|
+
SHIM_API int shim_rig_set_ctcss_sql(hamlib_shim_handle_t h, int vfo, unsigned int tone);
|
|
463
|
+
SHIM_API int shim_rig_get_ctcss_sql(hamlib_shim_handle_t h, int vfo, unsigned int* tone);
|
|
464
|
+
SHIM_API int shim_rig_set_dcs_sql(hamlib_shim_handle_t h, int vfo, unsigned int code);
|
|
465
|
+
SHIM_API int shim_rig_get_dcs_sql(hamlib_shim_handle_t h, int vfo, unsigned int* code);
|
|
466
|
+
|
|
467
|
+
/* ===== DTMF ===== */
|
|
468
|
+
|
|
469
|
+
SHIM_API int shim_rig_send_dtmf(hamlib_shim_handle_t h, int vfo, const char* digits);
|
|
470
|
+
SHIM_API int shim_rig_recv_dtmf(hamlib_shim_handle_t h, int vfo, char* digits, int* length);
|
|
471
|
+
|
|
472
|
+
/* ===== Morse code ===== */
|
|
473
|
+
|
|
474
|
+
SHIM_API int shim_rig_send_morse(hamlib_shim_handle_t h, int vfo, const char* msg);
|
|
475
|
+
SHIM_API int shim_rig_stop_morse(hamlib_shim_handle_t h, int vfo);
|
|
476
|
+
SHIM_API int shim_rig_wait_morse(hamlib_shim_handle_t h, int vfo);
|
|
477
|
+
|
|
478
|
+
/* ===== Voice memory ===== */
|
|
479
|
+
|
|
480
|
+
SHIM_API int shim_rig_send_voice_mem(hamlib_shim_handle_t h, int vfo, int ch);
|
|
481
|
+
SHIM_API int shim_rig_stop_voice_mem(hamlib_shim_handle_t h, int vfo);
|
|
482
|
+
|
|
483
|
+
/* ===== Power control ===== */
|
|
484
|
+
|
|
485
|
+
SHIM_API int shim_rig_set_powerstat(hamlib_shim_handle_t h, int status);
|
|
486
|
+
SHIM_API int shim_rig_get_powerstat(hamlib_shim_handle_t h, int* status);
|
|
487
|
+
|
|
488
|
+
/* ===== Power conversion ===== */
|
|
489
|
+
|
|
490
|
+
SHIM_API int shim_rig_power2mW(hamlib_shim_handle_t h, unsigned int* mwpower, float power, double freq, int mode);
|
|
491
|
+
SHIM_API int shim_rig_mW2power(hamlib_shim_handle_t h, float* power, unsigned int mwpower, double freq, int mode);
|
|
492
|
+
|
|
493
|
+
/* ===== Reset ===== */
|
|
494
|
+
|
|
495
|
+
SHIM_API int shim_rig_reset(hamlib_shim_handle_t h, int reset_type);
|
|
496
|
+
|
|
497
|
+
/* ===== Callbacks ===== */
|
|
498
|
+
|
|
499
|
+
SHIM_API int shim_rig_set_freq_callback(hamlib_shim_handle_t h, shim_freq_cb_t cb, void* arg);
|
|
500
|
+
SHIM_API int shim_rig_set_ptt_callback(hamlib_shim_handle_t h, shim_ptt_cb_t cb, void* arg);
|
|
501
|
+
SHIM_API int shim_rig_set_trn(hamlib_shim_handle_t h, int trn);
|
|
502
|
+
|
|
503
|
+
/* ===== Capability queries (replaces direct caps-> access) ===== */
|
|
504
|
+
|
|
505
|
+
SHIM_API uint64_t shim_rig_get_mode_list(hamlib_shim_handle_t h);
|
|
506
|
+
SHIM_API uint64_t shim_rig_get_caps_has_get_level(hamlib_shim_handle_t h);
|
|
507
|
+
SHIM_API uint64_t shim_rig_get_caps_has_set_level(hamlib_shim_handle_t h);
|
|
508
|
+
SHIM_API uint64_t shim_rig_get_caps_has_get_func(hamlib_shim_handle_t h);
|
|
509
|
+
SHIM_API uint64_t shim_rig_get_caps_has_set_func(hamlib_shim_handle_t h);
|
|
510
|
+
|
|
511
|
+
/* Format mode bitmask to string list */
|
|
512
|
+
SHIM_API int shim_rig_sprintf_mode(uint64_t modes, char* buf, int buflen);
|
|
513
|
+
|
|
514
|
+
/* Rig type to string conversion */
|
|
515
|
+
SHIM_API const char* shim_rig_type_str(int rig_type);
|
|
516
|
+
|
|
517
|
+
/* ===== Capability Query: Structured data types ===== */
|
|
518
|
+
|
|
519
|
+
/* ABI-safe struct for frequency range (no Hamlib types cross boundary) */
|
|
520
|
+
typedef struct {
|
|
521
|
+
double start_freq; /* Hz */
|
|
522
|
+
double end_freq; /* Hz */
|
|
523
|
+
uint64_t modes; /* rmode_t bitmask */
|
|
524
|
+
int low_power; /* mW */
|
|
525
|
+
int high_power; /* mW */
|
|
526
|
+
int vfo; /* vfo_t */
|
|
527
|
+
int ant; /* ant_t */
|
|
528
|
+
} shim_freq_range_t;
|
|
529
|
+
|
|
530
|
+
/* ABI-safe struct for tuning step / filter */
|
|
531
|
+
typedef struct {
|
|
532
|
+
uint64_t modes; /* rmode_t bitmask */
|
|
533
|
+
int value; /* step Hz or filter width Hz */
|
|
534
|
+
} shim_mode_value_t;
|
|
535
|
+
|
|
536
|
+
/* Group A: Simple value queries */
|
|
537
|
+
SHIM_API int shim_rig_get_caps_preamp(hamlib_shim_handle_t h, int* out, int max_count);
|
|
538
|
+
SHIM_API int shim_rig_get_caps_attenuator(hamlib_shim_handle_t h, int* out, int max_count);
|
|
539
|
+
SHIM_API long shim_rig_get_caps_max_rit(hamlib_shim_handle_t h);
|
|
540
|
+
SHIM_API long shim_rig_get_caps_max_xit(hamlib_shim_handle_t h);
|
|
541
|
+
SHIM_API long shim_rig_get_caps_max_ifshift(hamlib_shim_handle_t h);
|
|
542
|
+
|
|
543
|
+
/* Group B: Tone/code lists */
|
|
544
|
+
SHIM_API int shim_rig_get_caps_ctcss_list(hamlib_shim_handle_t h, unsigned int* out, int max_count);
|
|
545
|
+
SHIM_API int shim_rig_get_caps_dcs_list(hamlib_shim_handle_t h, unsigned int* out, int max_count);
|
|
546
|
+
|
|
547
|
+
/* Group C: Structured data */
|
|
548
|
+
SHIM_API int shim_rig_get_caps_rx_range(hamlib_shim_handle_t h, shim_freq_range_t* out, int max_count);
|
|
549
|
+
SHIM_API int shim_rig_get_caps_tx_range(hamlib_shim_handle_t h, shim_freq_range_t* out, int max_count);
|
|
550
|
+
SHIM_API int shim_rig_get_caps_tuning_steps(hamlib_shim_handle_t h, shim_mode_value_t* out, int max_count);
|
|
551
|
+
SHIM_API int shim_rig_get_caps_filters(hamlib_shim_handle_t h, shim_mode_value_t* out, int max_count);
|
|
552
|
+
|
|
553
|
+
/* ===== Lock Mode (Hamlib >= 4.7.0) ===== */
|
|
554
|
+
|
|
555
|
+
SHIM_API int shim_rig_set_lock_mode(hamlib_shim_handle_t h, int lock);
|
|
556
|
+
SHIM_API int shim_rig_get_lock_mode(hamlib_shim_handle_t h, int *lock);
|
|
557
|
+
|
|
558
|
+
/* ===== Clock (Hamlib >= 4.7.0) ===== */
|
|
559
|
+
|
|
560
|
+
SHIM_API int shim_rig_set_clock(hamlib_shim_handle_t h, int year, int month, int day,
|
|
561
|
+
int hour, int min, int sec, double msec, int utc_offset);
|
|
562
|
+
SHIM_API int shim_rig_get_clock(hamlib_shim_handle_t h, int *year, int *month, int *day,
|
|
563
|
+
int *hour, int *min, int *sec, double *msec, int *utc_offset);
|
|
564
|
+
|
|
565
|
+
/* ===== VFO Info (Hamlib >= 4.7.0) ===== */
|
|
566
|
+
|
|
567
|
+
SHIM_API int shim_rig_get_vfo_info(hamlib_shim_handle_t h, int vfo,
|
|
568
|
+
double *freq, uint64_t *mode,
|
|
569
|
+
long *width, int *split, int *satmode);
|
|
570
|
+
|
|
571
|
+
/* ===== Rig info / Raw / Conf ===== */
|
|
572
|
+
|
|
573
|
+
SHIM_API const char* shim_rig_get_info(hamlib_shim_handle_t h);
|
|
574
|
+
SHIM_API int shim_rig_send_raw(hamlib_shim_handle_t h,
|
|
575
|
+
const unsigned char* send, int send_len,
|
|
576
|
+
unsigned char* reply, int reply_len, const unsigned char* term);
|
|
577
|
+
SHIM_API int shim_rig_set_conf(hamlib_shim_handle_t h, const char* name, const char* val);
|
|
578
|
+
SHIM_API int shim_rig_get_conf(hamlib_shim_handle_t h, const char* name, char* buf, int buflen);
|
|
579
|
+
|
|
580
|
+
/* ===== Passband / Resolution ===== */
|
|
581
|
+
|
|
582
|
+
SHIM_API int shim_rig_passband_normal(hamlib_shim_handle_t h, int mode);
|
|
583
|
+
SHIM_API int shim_rig_get_resolution(hamlib_shim_handle_t h, int mode);
|
|
584
|
+
|
|
585
|
+
/* ===== Capability queries (parm / vfo_ops / scan) ===== */
|
|
586
|
+
|
|
587
|
+
SHIM_API uint64_t shim_rig_get_caps_has_get_parm(hamlib_shim_handle_t h);
|
|
588
|
+
SHIM_API uint64_t shim_rig_get_caps_has_set_parm(hamlib_shim_handle_t h);
|
|
589
|
+
SHIM_API int shim_rig_get_caps_vfo_ops(hamlib_shim_handle_t h);
|
|
590
|
+
SHIM_API int shim_rig_get_caps_has_scan(hamlib_shim_handle_t h);
|
|
591
|
+
|
|
592
|
+
/* ===== Static info ===== */
|
|
593
|
+
|
|
594
|
+
SHIM_API const char* shim_rig_copyright(void);
|
|
595
|
+
SHIM_API const char* shim_rig_license(void);
|
|
596
|
+
|
|
597
|
+
#ifdef __cplusplus
|
|
598
|
+
}
|
|
599
|
+
#endif
|
|
600
|
+
|
|
601
|
+
#endif /* HAMLIB_SHIM_H */
|
package/prebuilds/BUILD_INFO.txt
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
Node-HamLib Precompiled Binaries
|
|
2
|
-
================================
|
|
3
|
-
Build Time: Sat Nov 15 13:47:42 UTC 2025
|
|
4
|
-
Git Commit: 422425ac9142d27cc806b014a29066aee25cfcfb
|
|
5
|
-
Git Ref: refs/heads/main
|
|
6
|
-
|
|
7
|
-
Supported Platforms:
|
|
8
|
-
- darwin-arm64
|
|
9
|
-
- darwin-x64
|
|
10
|
-
- linux-arm64
|
|
11
|
-
- linux-x64
|
|
12
|
-
- win32-x64
|
|
13
|
-
|
|
14
|
-
Installation: Extract to your project's prebuilds/ directory
|
package/src/hamlib_compat.h
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* hamlib_compat.h - Hamlib compatibility layer for different versions
|
|
5
|
-
*
|
|
6
|
-
* This header handles compatibility issues between different versions of hamlib
|
|
7
|
-
* Some functions are only available in newer versions and may not be present
|
|
8
|
-
* in older Linux distribution packages.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include <hamlib/rig.h>
|
|
12
|
-
|
|
13
|
-
// Check for hamlib version if available
|
|
14
|
-
#ifdef HAMLIB_VERSION
|
|
15
|
-
// Version-specific feature detection
|
|
16
|
-
#if HAMLIB_VERSION >= 0x040500 // Version 4.5.0 and later
|
|
17
|
-
#define HAVE_RIG_STOP_VOICE_MEM 1
|
|
18
|
-
#define HAVE_RIG_SPLIT_FREQ_MODE 1
|
|
19
|
-
#endif
|
|
20
|
-
#else
|
|
21
|
-
// If version is not available, assume older version
|
|
22
|
-
// We'll disable newer functions for maximum compatibility
|
|
23
|
-
#undef HAVE_RIG_STOP_VOICE_MEM
|
|
24
|
-
#undef HAVE_RIG_SPLIT_FREQ_MODE
|
|
25
|
-
#endif
|
|
26
|
-
|
|
27
|
-
// Manual feature detection based on typical availability
|
|
28
|
-
// These functions were added in recent hamlib versions
|
|
29
|
-
// Comment out these lines if your hamlib version doesn't have them
|
|
30
|
-
|
|
31
|
-
// Uncomment if you have a newer hamlib version with these functions:
|
|
32
|
-
// #define HAVE_RIG_STOP_VOICE_MEM 1
|
|
33
|
-
// #define HAVE_RIG_SPLIT_FREQ_MODE 1
|
|
34
|
-
|
|
35
|
-
// For maximum compatibility with older distributions, keep these disabled
|
|
36
|
-
// Users with newer hamlib can enable them manually
|
|
37
|
-
|
|
38
|
-
#ifndef HAVE_RIG_STOP_VOICE_MEM
|
|
39
|
-
#define HAVE_RIG_STOP_VOICE_MEM 0
|
|
40
|
-
#endif
|
|
41
|
-
|
|
42
|
-
#ifndef HAVE_RIG_SPLIT_FREQ_MODE
|
|
43
|
-
#define HAVE_RIG_SPLIT_FREQ_MODE 0
|
|
44
|
-
#endif
|