mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-21 10:27:18 +00:00
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.
This commit is contained in:
parent
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????
|
||||
//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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user