kopia lustrzana https://github.com/Hamlib/Hamlib
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
rodzic
295ad74757
commit
9f997d799d
|
@ -667,7 +667,7 @@ static int rotorez_rot_get_position(ROT *rot, azimuth_t *azimuth,
|
||||||
|
|
||||||
//TODO: Should this be rotp or rotp2????
|
//TODO: Should this be rotp or rotp2????
|
||||||
//err = read_block(&rs->rotport, (unsigned char *) az, AZ_READ_LEN);
|
//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)
|
if (err != AZ_READ_LEN)
|
||||||
{
|
{
|
||||||
|
|
|
@ -102,7 +102,7 @@ int main(int argc, char *argv[])
|
||||||
int flag = 0;
|
int flag = 0;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
int bytes;
|
int bytes;
|
||||||
if (!flag) bytes = getmyline(fd, buf);
|
if (!flag) bytes = getmyline(fd, buf);
|
||||||
else bytes = getmyline(fd2, buf);
|
else bytes = getmyline(fd2, buf);
|
||||||
|
|
|
@ -266,12 +266,12 @@ ROT *HAMLIB_API rot_init(rot_model_t rot_model)
|
||||||
rotp2 = ROTPORT2(rot);
|
rotp2 = ROTPORT2(rot);
|
||||||
|
|
||||||
rs->comm_state = 0;
|
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->write_delay = rotp2->write_delay = caps->write_delay;
|
||||||
rotp->post_write_delay = caps->post_write_delay;
|
rotp->post_write_delay = rotp2->post_write_delay = caps->post_write_delay;
|
||||||
rotp->timeout = caps->timeout;
|
rotp->timeout = rotp2->timeout = caps->timeout;
|
||||||
rotp->retry = caps->retry;
|
rotp->retry = rotp2->retry = caps->retry;
|
||||||
|
|
||||||
switch (caps->port_type)
|
switch (caps->port_type)
|
||||||
{
|
{
|
||||||
|
|
Ładowanie…
Reference in New Issue