Make rotctld caps reflect underlying rotator -- removes const declaration from rot_caps

This needs to be expanded to cover the other functions too
pull/1042/head
Mike Black W9MDB 2022-05-19 11:22:39 -05:00
rodzic 468dd15110
commit 85dfb1bed8
4 zmienionych plików z 10 dodań i 10 usunięć

Wyświetl plik

@ -43,7 +43,7 @@ public:
Rotator& operator=(const Rotator&) = default;
Rotator& operator=(Rotator&&) = default;
const struct rot_caps *caps;
struct rot_caps *caps;
// This method opens the communication port to the rot
void open(void);

Wyświetl plik

@ -115,7 +115,7 @@ static int netrotctl_open(ROT *rot)
return (ret < 0) ? ret : -RIG_EPROTO;
}
rs->min_az = atof(buf);
rs->min_az = rot->caps->min_az = atof(buf);
ret = read_string(&rot->state.rotport, (unsigned char *) buf, BUF_MAX, "\n",
sizeof("\n"), 0, 1);
@ -125,7 +125,7 @@ static int netrotctl_open(ROT *rot)
return (ret < 0) ? ret : -RIG_EPROTO;
}
rs->max_az = atof(buf);
rs->max_az = rot->caps->max_az = atof(buf);
ret = read_string(&rot->state.rotport, (unsigned char *) buf, BUF_MAX, "\n",
sizeof("\n"), 0, 1);
@ -135,7 +135,7 @@ static int netrotctl_open(ROT *rot)
return (ret < 0) ? ret : -RIG_EPROTO;
}
rs->min_el = atof(buf);
rs->min_el = rot->caps->min_el = atof(buf);
ret = read_string(&rot->state.rotport, (unsigned char *) buf, BUF_MAX, "\n",
sizeof("\n"), 0, 1);
@ -145,7 +145,7 @@ static int netrotctl_open(ROT *rot)
return (ret < 0) ? ret : -RIG_EPROTO;
}
rs->max_el = atof(buf);
rs->max_el = rot->caps->max_el = atof(buf);
return RIG_OK;
}
@ -333,7 +333,7 @@ static const char *netrotctl_get_info(ROT *rot)
* NET rotctl capabilities.
*/
const struct rot_caps netrotctl_caps =
struct rot_caps netrotctl_caps =
{
ROT_MODEL(ROT_MODEL_NETROTCTL),
.model_name = "NET rotctl",

Wyświetl plik

@ -924,12 +924,12 @@ static int dummy_rot_get_status(ROT *rot, rot_status_t *status)
/*
* Dummy rotator capabilities.
*/
const struct rot_caps dummy_rot_caps =
struct rot_caps dummy_rot_caps =
{
ROT_MODEL(ROT_MODEL_DUMMY),
.model_name = "Dummy",
.mfg_name = "Hamlib",
.version = "20220118.0",
.version = "20220519.0",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rot_type = ROT_TYPE_AZEL,

Wyświetl plik

@ -36,7 +36,7 @@
#define TOK_EL_ROT_MAGICCOMBO TOKEN_BACKEND(5)
#define TOK_EL_ROT_MAGICEXTFUNC TOKEN_BACKEND(6)
extern const struct rot_caps dummy_rot_caps;
extern const struct rot_caps netrotctl_caps;
extern struct rot_caps dummy_rot_caps;
extern struct rot_caps netrotctl_caps;
#endif /* _ROT_DUMMY_H */