More amplifier and rotator state changes

This commit is contained in:
George Baltz N3GB 2024-07-11 12:35:00 -04:00
parent c28caa7a9c
commit 7bf63ecbf0
5 changed files with 19 additions and 19 deletions

View File

@ -329,7 +329,7 @@ int main(int argc, char *argv[])
if (amp_file)
{
strncpy(AMPPORT(my_amp)->pathname, amp_file, HAMLIB_FILPATHLEN - 1);
strncpy(my_amp->state.ampport_deprecated.pathname, amp_file,
strncpy(AMPSTATE(my_amp)->ampport_deprecated.pathname, amp_file,
HAMLIB_FILPATHLEN - 1);
}
@ -337,7 +337,7 @@ int main(int argc, char *argv[])
if (serial_rate != 0)
{
AMPPORT(my_amp)->parm.serial.rate = serial_rate;
my_amp->state.ampport_deprecated.parm.serial.rate = serial_rate;
AMPSTATE(my_amp)->ampport_deprecated.parm.serial.rate = serial_rate;
}
/*

View File

@ -1697,7 +1697,7 @@ declare_proto_amp(set_level)
if (!strcmp(arg1, "?"))
{
char s[SPRINTF_MAX_SIZE];
rig_sprintf_level(s, sizeof(s), amp->state.has_set_level);
rig_sprintf_level(s, sizeof(s), AMPSTATE(amp)->has_set_level);
fputs(s, fout);
if (amp->caps->set_ext_level)
@ -1777,7 +1777,7 @@ declare_proto_amp(get_level)
if (!strcmp(arg1, "?"))
{
char s[SPRINTF_MAX_SIZE];
amp_sprintf_level(s, sizeof(s), amp->state.has_get_level);
amp_sprintf_level(s, sizeof(s), AMPSTATE(amp)->has_get_level);
fputs(s, fout);

View File

@ -417,8 +417,8 @@ int main(int argc, char *argv[])
exit(0);
}
my_rot->state.az_offset = az_offset;
my_rot->state.el_offset = el_offset;
ROTSTATE(my_rot)->az_offset = az_offset;
ROTSTATE(my_rot)->el_offset = el_offset;
if (verbose > 0)
{

View File

@ -1934,7 +1934,7 @@ declare_proto_rot(set_level)
if (!strcmp(arg1, "?"))
{
char s[SPRINTF_MAX_SIZE];
rot_sprintf_level(s, sizeof(s), rot->state.has_set_level);
rot_sprintf_level(s, sizeof(s), ROTSTATE(rot)->has_set_level);
fputs(s, fout);
if (rot->caps->set_ext_level)
@ -2010,7 +2010,7 @@ declare_proto_rot(get_level)
if (!strcmp(arg1, "?"))
{
char s[SPRINTF_MAX_SIZE];
rot_sprintf_level(s, sizeof(s), rot->state.has_get_level);
rot_sprintf_level(s, sizeof(s), ROTSTATE(rot)->has_get_level);
fputs(s, fout);
if (rot->caps->get_ext_level)
@ -2108,7 +2108,7 @@ declare_proto_rot(set_func)
if (!strcmp(arg1, "?"))
{
char s[SPRINTF_MAX_SIZE];
rot_sprintf_func(s, sizeof(s), rot->state.has_set_func);
rot_sprintf_func(s, sizeof(s), ROTSTATE(rot)->has_set_func);
fprintf(fout, "%s\n", s);
return RIG_OK;
}
@ -2146,7 +2146,7 @@ declare_proto_rot(get_func)
if (!strcmp(arg1, "?"))
{
char s[SPRINTF_MAX_SIZE];
rot_sprintf_func(s, sizeof(s), rot->state.has_get_func);
rot_sprintf_func(s, sizeof(s), ROTSTATE(rot)->has_get_func);
fprintf(fout, "%s\n", s);
return RIG_OK;
}
@ -2208,7 +2208,7 @@ declare_proto_rot(set_parm)
if (!strcmp(arg1, "?"))
{
char s[SPRINTF_MAX_SIZE];
rot_sprintf_parm(s, sizeof(s), rot->state.has_set_parm);
rot_sprintf_parm(s, sizeof(s), ROTSTATE(rot)->has_set_parm);
fprintf(fout, "%s\n", s);
return RIG_OK;
}
@ -2281,7 +2281,7 @@ declare_proto_rot(get_parm)
if (!strcmp(arg1, "?"))
{
char s[SPRINTF_MAX_SIZE];
rot_sprintf_parm(s, sizeof(s), rot->state.has_get_parm);
rot_sprintf_parm(s, sizeof(s), ROTSTATE(rot)->has_get_parm);
fprintf(fout, "%s\n", s);
return RIG_OK;
}
@ -2426,7 +2426,7 @@ declare_proto_rot(dump_conf)
*/
declare_proto_rot(dump_state)
{
struct rot_state *rs = &rot->state;
struct rot_state *rs = ROTSTATE(rot);
char *tag;
/*
@ -2455,7 +2455,7 @@ declare_proto_rot(dump_state)
tag = "Minimum Azimuth: ";
}
fprintf(fout, "%s%lf%c", tag, rs->min_az + rot->state.az_offset, resp_sep);
fprintf(fout, "%s%lf%c", tag, rs->min_az + rs->az_offset, resp_sep);
tag = "max_az=";
@ -2464,7 +2464,7 @@ declare_proto_rot(dump_state)
tag = "Maximum Azimuth: ";
}
fprintf(fout, "%s%lf%c", tag, rs->max_az + rot->state.az_offset, resp_sep);
fprintf(fout, "%s%lf%c", tag, rs->max_az + rs->az_offset, resp_sep);
tag = "min_el=";
@ -2473,7 +2473,7 @@ declare_proto_rot(dump_state)
tag = "Minimum Elevation: ";
}
fprintf(fout, "%s%lf%c", tag, rs->min_el + rot->state.el_offset, resp_sep);
fprintf(fout, "%s%lf%c", tag, rs->min_el + rs->el_offset, resp_sep);
tag = "max_el=";
@ -2482,7 +2482,7 @@ declare_proto_rot(dump_state)
tag = "Maximum Elevation: ";
}
fprintf(fout, "%s%lf%c", tag, rs->max_el + rot->state.el_offset, resp_sep);
fprintf(fout, "%s%lf%c", tag, rs->max_el + rs->el_offset, resp_sep);
tag = "south_zero=";

View File

@ -417,8 +417,8 @@ int main(int argc, char *argv[])
exit(2);
}
my_rot->state.az_offset = az_offset;
my_rot->state.el_offset = el_offset;
ROTSTATE(my_rot)->az_offset = az_offset;
ROTSTATE(my_rot)->el_offset = el_offset;
if (verbose > 0)
{