diff --git a/rigs/dummy/netrigctl.c b/rigs/dummy/netrigctl.c index 5b32afdb0..5cb0c3ad0 100644 --- a/rigs/dummy/netrigctl.c +++ b/rigs/dummy/netrigctl.c @@ -1071,9 +1071,11 @@ static int netrigctl_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) char buf[BUF_MAX]; char vfostr[16] = ""; - rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, ptt=%d, ptt_type=%d\n", __func__, + rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, ptt=%d, ptt_type=%d\n", + __func__, rig_strvfo(vfo), ptt, rig->state.pttport.type.ptt); - if(rig->state.pttport.type.ptt == RIG_PTT_NONE) return RIG_OK; + + if (rig->state.pttport.type.ptt == RIG_PTT_NONE) { return RIG_OK; } ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A); diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 6dbc0cf9c..11ba6d254 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -682,28 +682,28 @@ int icom_init(RIG *rig) // we can add rigs here that will never use the 0x25 cmd // some like the 751 don't even reject the command and have to time out if ( - rig->caps->rig_model == RIG_MODEL_IC275 - || rig->caps->rig_model == RIG_MODEL_IC375 - || rig->caps->rig_model == RIG_MODEL_IC706 - || rig->caps->rig_model == RIG_MODEL_IC706MKII - || rig->caps->rig_model == RIG_MODEL_IC706MKIIG - || rig->caps->rig_model == RIG_MODEL_IC751 - || rig->caps->rig_model == RIG_MODEL_X5105 - || rig->caps->rig_model == RIG_MODEL_IC1275 - || rig->caps->rig_model == RIG_MODEL_IC746 - || rig->caps->rig_model == RIG_MODEL_IC756 - || rig->caps->rig_model == RIG_MODEL_IC756PRO - || rig->caps->rig_model == RIG_MODEL_IC756PROII - || rig->caps->rig_model == RIG_MODEL_IC756PROIII - || rig->caps->rig_model == RIG_MODEL_IC746PRO - || rig->caps->rig_model == RIG_MODEL_IC756 - || rig->caps->rig_model == RIG_MODEL_IC7000 - || rig->caps->rig_model == RIG_MODEL_IC7100 - || rig->caps->rig_model == RIG_MODEL_IC7200 - || rig->caps->rig_model == RIG_MODEL_IC821H - || rig->caps->rig_model == RIG_MODEL_IC910 - || rig->caps->rig_model == RIG_MODEL_IC2730 - ) + rig->caps->rig_model == RIG_MODEL_IC275 + || rig->caps->rig_model == RIG_MODEL_IC375 + || rig->caps->rig_model == RIG_MODEL_IC706 + || rig->caps->rig_model == RIG_MODEL_IC706MKII + || rig->caps->rig_model == RIG_MODEL_IC706MKIIG + || rig->caps->rig_model == RIG_MODEL_IC751 + || rig->caps->rig_model == RIG_MODEL_X5105 + || rig->caps->rig_model == RIG_MODEL_IC1275 + || rig->caps->rig_model == RIG_MODEL_IC746 + || rig->caps->rig_model == RIG_MODEL_IC756 + || rig->caps->rig_model == RIG_MODEL_IC756PRO + || rig->caps->rig_model == RIG_MODEL_IC756PROII + || rig->caps->rig_model == RIG_MODEL_IC756PROIII + || rig->caps->rig_model == RIG_MODEL_IC746PRO + || rig->caps->rig_model == RIG_MODEL_IC756 + || rig->caps->rig_model == RIG_MODEL_IC7000 + || rig->caps->rig_model == RIG_MODEL_IC7100 + || rig->caps->rig_model == RIG_MODEL_IC7200 + || rig->caps->rig_model == RIG_MODEL_IC821H + || rig->caps->rig_model == RIG_MODEL_IC910 + || rig->caps->rig_model == RIG_MODEL_IC2730 + ) { priv->x25cmdfails = 1; } @@ -814,7 +814,8 @@ static vfo_t icom_current_vfo_x25(RIG *rig) { // we can't change freqs unless rig is idle and we don't know that // so we only check vfo once when freqs are equal - rig_debug(RIG_DEBUG_TRACE, "%s: vfo already determined...returning current_vfo\n", + rig_debug(RIG_DEBUG_TRACE, + "%s: vfo already determined...returning current_vfo\n", __func__); return rig->state.current_vfo; } @@ -1882,7 +1883,8 @@ pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode) } } - if (RIG_MODEL_X108G == rig->caps->rig_model || RIG_MODEL_X5105 == rig->caps->rig_model) + if (RIG_MODEL_X108G == rig->caps->rig_model + || RIG_MODEL_X5105 == rig->caps->rig_model) { priv->no_1a_03_cmd = ENUM_1A_03_NO; } @@ -3455,7 +3457,8 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val) int found = 0; for (i = 0; - i <= RIG_AGC_LAST && priv_caps->agc_levels[i].level != RIG_AGC_LAST && priv_caps->agc_levels[i].icom_level >= 0; i++) + i <= RIG_AGC_LAST && priv_caps->agc_levels[i].level != RIG_AGC_LAST + && priv_caps->agc_levels[i].icom_level >= 0; i++) { if (priv_caps->agc_levels[i].level == val.i) { diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index c773a799d..75306e828 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -4941,6 +4941,7 @@ int kenwood_send_morse(RIG *rig, vfo_t vfo, const char *msg) * If answer is something else, return with error to prevent infinite loops */ if (!strncmp(m2, "KY0", 3)) { break; } + if (!strncmp(m2, "KY2", 3)) { break; } if (!strncmp(m2, "KY1", 3)) { hl_usleep(500000); } diff --git a/rigs/yaesu/ft747.c b/rigs/yaesu/ft747.c index dbf271653..1679b0350 100644 --- a/rigs/yaesu/ft747.c +++ b/rigs/yaesu/ft747.c @@ -547,7 +547,8 @@ int ft747_set_freq(RIG *rig, vfo_t vfo, freq_t freq) p = (struct ft747_priv_data *)rig->state.priv; - rig_debug(RIG_DEBUG_VERBOSE, "ft747: requested freq = %"PRIfreq" Hz vfo = %s \n", freq, rig_strvfo(vfo)); + rig_debug(RIG_DEBUG_VERBOSE, + "ft747: requested freq = %"PRIfreq" Hz vfo = %s \n", freq, rig_strvfo(vfo)); /* * Copy native cmd freq_set to private cmd storage area @@ -579,12 +580,15 @@ int ft747_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) freq_t f; int ret; - rig_debug(RIG_DEBUG_VERBOSE, "%s: called vfo=%s, freqMainA=%.0f, freqMainB=%.0f\n", __func__, rig_strvfo(vfo), rig->state.cache.freqMainA, rig->state.cache.freqMainB); + rig_debug(RIG_DEBUG_VERBOSE, + "%s: called vfo=%s, freqMainA=%.0f, freqMainB=%.0f\n", __func__, + rig_strvfo(vfo), rig->state.cache.freqMainA, rig->state.cache.freqMainB); - if (vfo == RIG_VFO_CURR) vfo = rig->state.cache.vfo; - if (rig->state.cache.ptt == RIG_PTT_ON) + if (vfo == RIG_VFO_CURR) { vfo = rig->state.cache.vfo; } + + if (rig->state.cache.ptt == RIG_PTT_ON) { - *freq = RIG_VFO_B? rig->state.cache.freqMainB : rig->state.cache.freqMainA; + *freq = RIG_VFO_B ? rig->state.cache.freqMainB : rig->state.cache.freqMainA; return RIG_OK; } @@ -999,7 +1003,8 @@ static int ft747_get_update_data(RIG *rig) p = (struct ft747_priv_data *)rig->state.priv; rigport = &rig->state.rigport; - if (rig->state.cache.ptt == RIG_PTT_ON || !rig_check_cache_timeout(&p->status_tv, FT747_CACHE_TIMEOUT)) + if (rig->state.cache.ptt == RIG_PTT_ON + || !rig_check_cache_timeout(&p->status_tv, FT747_CACHE_TIMEOUT)) { return RIG_OK; } diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index b4e161c7d..80c8163f4 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -771,14 +771,15 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) ENTERFUNC; - if (newcat_60m_exception(rig, freq)) - { + if (newcat_60m_exception(rig, freq)) + { // we don't try to set freq on 60m for some rigs since we must be in memory mode // and we can't run split mode on 60M memory mode either if (rig->state.cache.split == RIG_SPLIT_ON) { rig_set_split_vfo(rig, RIG_VFO_A, RIG_VFO_A, RIG_SPLIT_OFF); } + RETURNFUNC(RIG_OK); } // we don't set freq in this case @@ -10382,7 +10383,7 @@ int newcat_get_cmd(RIG *rig) rig_debug(RIG_DEBUG_WARN, "%s: Rig busy - retrying %d of %d: '%s'\n", __func__, retry_count, state->rigport.retry, priv->cmd_str); // DX3000 was taking 1.6 seconds in certain command sequences - hl_usleep(600*1000); // 600ms wait should cover most cases hopefully + hl_usleep(600 * 1000); // 600ms wait should cover most cases hopefully rc = -RIG_ERJCTED; /* retry */ break; diff --git a/rotators/rotorez/rotorez.c b/rotators/rotorez/rotorez.c index 6d8c1b75b..0ce9c068b 100644 --- a/rotators/rotorez/rotorez.c +++ b/rotators/rotorez/rotorez.c @@ -312,7 +312,7 @@ const struct rot_caps yrc1_rot_caps = ROT_MODEL(ROT_MODEL_YRC1), .model_name = "DCU2/DCU3/YRC-1", .mfg_name = "Hy-Gain", - .version = "20100823.2", + .version = "20100823.2", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rot_type = ROT_TYPE_OTHER, diff --git a/simulators/simft897.c b/simulators/simft897.c index f889bc68d..6367847c2 100644 --- a/simulators/simft897.c +++ b/simulators/simft897.c @@ -142,13 +142,14 @@ again: case 0xF7: printf("READ TX STATUS\n"); break; - case 0x03: - printf("READ RX STATUS\n"); + case 0x03: + printf("READ RX STATUS\n"); buf[0] = buf[1] = buf[2] = buf[3] = 0; - buf[4] = 0x03; n = write(fd, buf, 5); + buf[4] = 0x03; n = write(fd, buf, 5); break; - case 0xbb: buf[0] = buf[1] = 0;printf("READ EPROM\n"); n = write(fd, buf, 2);break; + case 0xbb: buf[0] = buf[1] = 0; printf("READ EPROM\n"); n = write(fd, buf, 2); + break; default: printf("Unknown cmd=%02x\n", buf[4]); } diff --git a/simulators/simkenwood.c b/simulators/simkenwood.c index bf70b8b1e..e49bcf2e2 100644 --- a/simulators/simkenwood.c +++ b/simulators/simkenwood.c @@ -296,13 +296,13 @@ int main(int argc, char *argv[]) { SNPRINTF(buf, sizeof(buf), "DA%d;", datamode); n = write(fd, buf, strlen(buf)); - printf("%s\n",buf); + printf("%s\n", buf); continue; } else if (strncmp(buf, "DA", 2) == 0) { sscanf(buf, "DA%d", &datamode); - printf("%s\n",buf); + printf("%s\n", buf); continue; } else if (strncmp(buf, "BD;", 3) == 0) diff --git a/tests/dumpcaps.c b/tests/dumpcaps.c index 7258ffaf7..fb666d3ba 100644 --- a/tests/dumpcaps.c +++ b/tests/dumpcaps.c @@ -296,7 +296,8 @@ int dumpcaps(RIG *rig, FILE *fout) const struct icom_priv_caps *priv_caps = (const struct icom_priv_caps *) rig->caps->priv; - if (priv_caps && RIG_BACKEND_NUM(rig->caps->rig_model) == RIG_ICOM && priv_caps->agc_levels_present) + if (priv_caps && RIG_BACKEND_NUM(rig->caps->rig_model) == RIG_ICOM + && priv_caps->agc_levels_present) { for (i = 0; i <= RIG_AGC_LAST && priv_caps->agc_levels[i].level != RIG_AGC_LAST && priv_caps->agc_levels[i].icom_level >= 0; i++) diff --git a/tests/rigctl.c b/tests/rigctl.c index 2b18f0cad..c90064686 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -736,7 +736,8 @@ void usage(void) usage_rig(stdout); printf("\nError codes and messages\n"); - for(enum rig_errcode_e e = 0; e