Allow RIG_LEVEL_STRENGTH queries over the network link

The rig  frontend may be  able to emulate RIG_LEVEL_STRENGTH  by using
RIG_LEVEL_RAWSTR and an S-meter  calibration curve.  The netrig client
doesn't know  this so it must  pass STRENGTH queries regardless  if it
knows a RIG_LEVEL_RAWSTR query is allowed. If the server cannot oblige
it will return a -RIG_EINVAL error which should be fine.
astyle-formatting
Bill Somerville 2017-03-31 18:17:16 +01:00
rodzic 317ea83684
commit 2d6bb183f2
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -235,6 +235,13 @@ chan_t chan_list[CHANLSTSIZ]; /*!< Channel list, zero ended */
return (ret < 0) ? ret : -RIG_EPROTO;
rs->has_get_level = strtol(buf, NULL, 0);
if (rs->has_get_level & RIG_LEVEL_RAWSTR)
{
/* include STRENGTH because the remote rig may be able to
provide a front end emulation, if it can't then an
-RIG_EINVAL will be returned */
rs->has_get_level |= RIG_LEVEL_STRENGTH;
}
ret = read_string(&rig->state.rigport, buf, BUF_MAX, "\n", sizeof("\n"));
if (ret <= 0)