示例#1
0
void Animate::EventSetSyncTime
	(
	Event *ev
	)

{
	SetSyncTime( ev->GetFloat( 1 ) );
}
示例#2
0
static int ReSync( void )
{
    int result;            /* result of ReSyncing */

    ++BaudCounter;              /* next slower speed */
    if( BaudCounter > MIN_BAUD ) BaudCounter = MIN_BAUD;
    while( SetSyncTime() == FAIL ) ;
    result = Speed();           /* sync */
    return( result );
}
示例#3
0
bool RemoteConnect( void )
{
    int     baud_limit;     /* maximum baud that BOTH sides can achieve */
    byte    dummy;          /* hold values that we don't need here */
    byte    MaxBaud2;       /* MaxBaud at the other machine */

    SendBlkNo = ReceiveBlkNo = 0;
    LastResponse = SDATA_NAK;
    if( !SetSyncTime() )
        return( FALSE );
    /* establish baud limit */
#ifdef SERVER
    if( !WaitReceive( &dummy, 1, &MaxBaud2, SEC( 2 ) ) ) {
        return( FALSE );
    }
    if( !BlockSend( 1, (byte *)&MaxBaud, SEC( 2 ) ) ) {
        return( FALSE );
    }
#else
    if( !BlockSend( 1, (byte *)&MaxBaud, SEC( 2 ) ) ) {
        return( FALSE );
    }
    if( !WaitReceive( &dummy, 1, &MaxBaud2, SEC( 2 ) ) ) {
        return( FALSE );
    }
#endif
    /* MaxBaud2 now contains the other side's baud rate limit */
    if( MaxBaud > MaxBaud2 ) {
        baud_limit = MaxBaud;
    } else {
        baud_limit = MaxBaud2;
    }

    BaudCounter = baud_limit;
    if( !Speed() ) 
        return( FALSE );
#ifdef SERVER
    {
        char    buff[128];

        if( BaudCounter == MIN_BAUD ) {
            strcpy( buff, "pre-set" );
        } else {
            strcpy( buff, BaudTable[BaudCounter].name );
        }
        strcat( buff, " baud" );
        ServMessage( buff );
    }
#endif
    return( TRUE );
}