[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. e7b6e61ed09ea217b7bbd
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-01-22 17:01:44
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via e7b6e61ed09ea217b7bbdba613c1669dce0b1b47 (commit) from e1c21605f4e45ed7ab98326e021c176c05e0e0ee (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e7b6e61ed09ea217b7bbdba613c1669dce0b1b47 Author: Michael Black W9MDB <mdb...@ya...> Date: Fri Jan 22 10:41:30 2021 -0600 astyle files prepping for 4.1 release diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 41f09cbb..5e2d661f 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -551,7 +551,8 @@ static int flrig_transaction(RIG *rig, char *cmd, char *cmd_arg, char *value, xml_parse(xml, value, value_len); } } - while (((value && strlen(value) == 0) || (strlen(xml)==0)) && retry--); // we'll do retries if needed + while (((value && strlen(value) == 0) || (strlen(xml) == 0)) + && retry--); // we'll do retries if needed if (value && strlen(value) == 0) { return RIG_EPROTO; } diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index ffa35a01..aecf0540 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -3112,11 +3112,13 @@ int icom_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) else { float scale = 100; + if (rig->caps->rig_model == RIG_MODEL_IC705 || rig->caps->rig_model == RIG_MODEL_IC703) { scale = 10; } + val->f = rig_raw2val_float(icom_val, &rig->caps->rfpower_meter_cal) * scale; } diff --git a/rigs/prm80/prm80.c b/rigs/prm80/prm80.c index 0a026921..36db7fe2 100644 --- a/rigs/prm80/prm80.c +++ b/rigs/prm80/prm80.c @@ -376,7 +376,8 @@ int prm80_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only) if (statebuf_len < 20) { - rig_debug(RIG_DEBUG_ERR, "%s: statebuf_len < 20, statebuf='%s'\n", __func__, statebuf); + rig_debug(RIG_DEBUG_ERR, "%s: statebuf_len < 20, statebuf='%s'\n", __func__, + statebuf); RETURNFUNC(-RIG_EPROTO); } @@ -409,7 +410,8 @@ int prm80_get_channel(RIG *rig, vfo_t vfo, channel_t *chan, int read_only) { // Set rig to channel values rig_debug(RIG_DEBUG_ERR, - "%s: please contact hamlib mailing list to implement this, rxfreq=%.0f, txfreq=%.0f\n", __func__, chan->freq, chan->tx_freq); + "%s: please contact hamlib mailing list to implement this, rxfreq=%.0f, txfreq=%.0f\n", + __func__, chan->freq, chan->tx_freq); rig_debug(RIG_DEBUG_ERR, "%s: need to know if rig updates when channel read or not\n", __func__); //return -RIG_ENIMPL; diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 81240f16..423a6154 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -774,11 +774,14 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) target_vfo = 'A' == c ? '0' : '1'; - if(rig->state.cache.ptt == RIG_PTT_ON) // we have a few rigs that can't set TX VFO while PTT_ON - { // should be true whether we're on VFOA or VFOB but only restricting VFOB right now - // we return RIG_OK as we dont' want - if (is_ftdx3000 && target_vfo == 'B') return RIG_OK; - if (is_ftdx5000 && target_vfo == 'B') return RIG_OK; + if (rig->state.cache.ptt == + RIG_PTT_ON) // we have a few rigs that can't set TX VFO while PTT_ON + { + // should be true whether we're on VFOA or VFOB but only restricting VFOB right now + // we return RIG_OK as we dont' want + if (is_ftdx3000 && target_vfo == 'B') { return RIG_OK; } + + if (is_ftdx5000 && target_vfo == 'B') { return RIG_OK; } } if (RIG_MODEL_FT450 == caps->rig_model) diff --git a/src/misc.c b/src/misc.c index 445c8492..a0b31cf8 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1638,7 +1638,7 @@ int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6]) // Handle device names 1st if (strstr(hoststr, "/dev")) { return -1; } - if (strstr(hoststr, "/")) { return -1; } // probably a path so not a hoststr + if (strstr(hoststr, "/")) { return -1; } // probably a path so not a hoststr if (strncasecmp(hoststr, "com", 3) == 0) { return -1; } diff --git a/tests/testrigcaps.c b/tests/testrigcaps.c index 1f1d7290..30099336 100644 --- a/tests/testrigcaps.c +++ b/tests/testrigcaps.c @@ -20,8 +20,10 @@ int main() #else int expected = 13280; // should be most 64-bit compilers #endif - if (offset == 9384) expected = 9384; // 32-bit Intel - if (offset == 10144) expected = 10144; // 32-bit Arm + + if (offset == 9384) { expected = 9384; } // 32-bit Intel + + if (offset == 10144) { expected = 10144; } // 32-bit Arm if (offset != expected) { @@ -41,8 +43,10 @@ int main() #else expected = 13696; #endif - if (offset == 9676) expected = 9676; // 32-bit Intel - if (offset == 10448) expected = 10448; // 32-bit Arm + + if (offset == 9676) { expected = 9676; } // 32-bit Intel + + if (offset == 10448) { expected = 10448; } // 32-bit Arm if (offset != expected) { diff --git a/tests/testrigopen.c b/tests/testrigopen.c index 65845ee2..03d4bfae 100644 --- a/tests/testrigopen.c +++ b/tests/testrigopen.c @@ -20,7 +20,7 @@ int callback(const struct rig_caps *caps, rig_ptr_t rigp) { - RIG *rig = (RIG*) rigp; + RIG *rig = (RIG *) rigp; rig = rig_init(caps->rig_model); @@ -35,13 +35,13 @@ int callback(const struct rig_caps *caps, rig_ptr_t rigp) strcpy(rig->state.rigport.pathname, port); printf("%20s:", caps->model_name); - fflush(stdout); - struct timeval start,end; - gettimeofday(&start,NULL); + fflush(stdout); + struct timeval start, end; + gettimeofday(&start, NULL); rig_open(rig); - gettimeofday(&end,NULL); - double dstart = start.tv_sec + start.tv_usec/1e6; - double dend = end.tv_sec + end.tv_usec/(double)1e6; + gettimeofday(&end, NULL); + double dstart = start.tv_sec + start.tv_usec / 1e6; + double dend = end.tv_sec + end.tv_usec / (double)1e6; printf(" %.1f\n", dend - dstart); rig_close(rig); /* close port */ ----------------------------------------------------------------------- Summary of changes: rigs/dummy/flrig.c | 3 ++- rigs/icom/icom.c | 2 ++ rigs/prm80/prm80.c | 6 ++++-- rigs/yaesu/newcat.c | 13 ++++++++----- src/misc.c | 2 +- tests/testrigcaps.c | 12 ++++++++---- tests/testrigopen.c | 14 +++++++------- 7 files changed, 32 insertions(+), 20 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |