TMXR: Properly adjust speed delays when the factor is dynamically changed
This commit is contained in:
parent
aea7f208cf
commit
4f61cd3a11
1 changed files with 7 additions and 1 deletions
|
@ -2498,9 +2498,15 @@ if (*cptr == '*') {
|
||||||
if (r != SCPE_OK)
|
if (r != SCPE_OK)
|
||||||
return r;
|
return r;
|
||||||
lp->bpsfactor = bpsfactor;
|
lp->bpsfactor = bpsfactor;
|
||||||
if (speed == cptr) /* just changing bps factor? */
|
if (speed == cptr) { /* just changing bps factor? */
|
||||||
|
char speedbps[16];
|
||||||
|
|
||||||
|
sprintf (speedbps, "%d", lp->rxbps);
|
||||||
|
lp->rxdeltausecs = (uint32)(_tmln_speed_delta (speedbps) / lp->bpsfactor);
|
||||||
|
lp->txdeltausecs = lp->rxdeltausecs;
|
||||||
return SCPE_OK; /* Done now */
|
return SCPE_OK; /* Done now */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
lp->rxbps = rxbps; /* use supplied speed */
|
lp->rxbps = rxbps; /* use supplied speed */
|
||||||
if ((lp->serport) && (lp->bpsfactor != 0.0))
|
if ((lp->serport) && (lp->bpsfactor != 0.0))
|
||||||
lp->bpsfactor = 1.0; /* Ignore bps factor for serial ports */
|
lp->bpsfactor = 1.0; /* Ignore bps factor for serial ports */
|
||||||
|
|
Loading…
Add table
Reference in a new issue