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,8 +2498,14 @@ if (*cptr == '*') {
|
|||
if (r != SCPE_OK)
|
||||
return r;
|
||||
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 */
|
||||
}
|
||||
}
|
||||
lp->rxbps = rxbps; /* use supplied speed */
|
||||
if ((lp->serport) && (lp->bpsfactor != 0.0))
|
||||
|
|
Loading…
Add table
Reference in a new issue