From 11acef5d3bc4645ad70881759b2aeaf0de443cfe Mon Sep 17 00:00:00 2001 From: George Baltz N3GB Date: Thu, 21 Nov 2024 19:21:41 -0500 Subject: [PATCH] MACROize new code. --- rigs/dummy/flrig.c | 2 +- rigs/yaesu/ft1000mp.c | 2 +- rigs/yaesu/ft817.c | 2 +- src/rig.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 58b6e8692..bfabc388b 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -853,7 +853,7 @@ static int flrig_open(RIG *rig) char model_name[256]; snprintf(model_name,sizeof(model_name), "%.248s(%s)", value, "FLRig"); rig->caps->model_name = strdup(model_name); - rig->state.model_name = strdup(model_name); + STATE(rig)->model_name = strdup(model_name); /* see if get_pwrmeter_scale is available */ retval = flrig_transaction(rig, "rig.get_pwrmeter_scale", NULL, value, diff --git a/rigs/yaesu/ft1000mp.c b/rigs/yaesu/ft1000mp.c index 9a6db6b78..d134c2b3a 100644 --- a/rigs/yaesu/ft1000mp.c +++ b/rigs/yaesu/ft1000mp.c @@ -945,7 +945,7 @@ static int ft1000mp_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) RETURNFUNC(retval); } - priv = (struct ft1000mp_priv_data *)rig->state.priv; + priv = (struct ft1000mp_priv_data *)STATE(rig)->priv; if (vfo == RIG_VFO_B) { diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index 68a28bf73..301e0e44f 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -1711,7 +1711,7 @@ static int ft817_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) // check if we're already in the mode and return if so // the memory check was failing when in FM mode -- still showing digmode - if (rig->state.current_mode == mode) + if (STATE(rig)->current_mode == mode) { if (digmode[0] == 0x00 && mode == RIG_MODE_RTTY) { return RIG_OK; } else if (digmode[0] == 0x01 && mode == RIG_MODE_PSKR) { return RIG_OK; } diff --git a/src/rig.c b/src/rig.c index a6cd5f2f3..bf233f360 100644 --- a/src/rig.c +++ b/src/rig.c @@ -7979,7 +7979,7 @@ int HAMLIB_API rig_get_rig_info(RIG *rig, char *response, int max_response_len) "VFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nVFO=%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nSplit=%d SatMode=%d\nRig=%s\nApp=%s\nVersion=20241103 1.1.0\nModel=%u\n", rig_strvfo(vfoA), freqA, modeAstr, (int)widthA, rxa, txa, rig_strvfo(vfoB), freqB, modeBstr, (int)widthB, rxb, txb, split, satmode, rig->caps->model_name, - rig->state.client_version, rig->caps->rig_model); + STATE(rig)->client_version, rig->caps->rig_model); unsigned long crc = CRC32_function((unsigned char *)response, strlen(response)); char tmpstr[32]; SNPRINTF(tmpstr, sizeof(tmpstr), "CRC=0x%08lx\n", crc);