diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index 41f09cbbf..5e2d661fd 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 ffa35a01c..aecf05403 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 0a026921e..36db7fe25 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 81240f169..423a61546 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 445c8492d..a0b31cf87 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 1f1d72903..30099336f 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 65845ee25..03d4bfae3 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 */