Fix incorrect port read for elevation

Add missing port parameters for rotp2
Remove funky character(^B) from simrotorez.c so `file` and `more` think it
  is plain text.

Dunno if this works on the real H/W, but at least the simulator can get
  and set az/el position without errors.
pull/1532/head
George Baltz N3GB 2024-03-28 16:26:21 -04:00
rodzic 295ad74757
commit 9f997d799d
3 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -667,7 +667,7 @@ static int rotorez_rot_get_position(ROT *rot, azimuth_t *azimuth,
//TODO: Should this be rotp or rotp2????
//err = read_block(&rs->rotport, (unsigned char *) az, AZ_READ_LEN);
err = read_block(rotp, (unsigned char *) az, AZ_READ_LEN);
err = read_block(rotp2, (unsigned char *) az, AZ_READ_LEN);
if (err != AZ_READ_LEN)
{

Wyświetl plik

@ -102,7 +102,7 @@ int main(int argc, char *argv[])
int flag = 0;
while (1)
{
{
int bytes;
if (!flag) bytes = getmyline(fd, buf);
else bytes = getmyline(fd2, buf);

Wyświetl plik

@ -266,12 +266,12 @@ ROT *HAMLIB_API rot_init(rot_model_t rot_model)
rotp2 = ROTPORT2(rot);
rs->comm_state = 0;
rotp->type.rig = caps->port_type; /* default from caps */
rotp->type.rig = rotp2->type.rig = caps->port_type; /* default from caps */
rotp->write_delay = caps->write_delay;
rotp->post_write_delay = caps->post_write_delay;
rotp->timeout = caps->timeout;
rotp->retry = caps->retry;
rotp->write_delay = rotp2->write_delay = caps->write_delay;
rotp->post_write_delay = rotp2->post_write_delay = caps->post_write_delay;
rotp->timeout = rotp2->timeout = caps->timeout;
rotp->retry = rotp2->retry = caps->retry;
switch (caps->port_type)
{