kopia lustrzana https://github.com/Hamlib/Hamlib
astyle files prepping for 4.1 release
rodzic
e1c21605f4
commit
e7b6e61ed0
|
@ -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; }
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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 */
|
||||
|
|
Ładowanie…
Reference in New Issue