Skip to content

Commit e116650

Browse files
boybookclaude
andcommitted
fix: correct SHIM_RIG_PORT_SERIAL/NETWORK constants to match hamlib enum
SHIM_RIG_PORT_SERIAL was incorrectly set to 0 (RIG_PORT_NONE) instead of 1 (RIG_PORT_SERIAL), causing rig_open() to succeed without actually opening the serial port. All subsequent operations then failed with "port not open". Fixed values: SERIAL=1, NETWORK=2 (matching hamlib rig_port_e enum). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c316704 commit e116650

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hamlib",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "Node.js wrapper for hamlib radio control library",
55
"main": "index.js",
66
"module": "lib/index.mjs",

src/shim/hamlib_shim.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ typedef void* hamlib_shim_handle_t;
7171
/* Passband constants */
7272
#define SHIM_RIG_PASSBAND_NORMAL 0
7373

74-
/* Port types */
75-
#define SHIM_RIG_PORT_SERIAL 0
76-
#define SHIM_RIG_PORT_NETWORK 4
74+
/* Port types (must match hamlib rig_port_e enum) */
75+
#define SHIM_RIG_PORT_NONE 0
76+
#define SHIM_RIG_PORT_SERIAL 1
77+
#define SHIM_RIG_PORT_NETWORK 2
7778

7879
/* Scan types */
7980
#define SHIM_RIG_SCAN_STOP 0

0 commit comments

Comments
 (0)