diff --git a/SimulatorMP.cpp b/SimulatorMP.cpp index acdc99a..9e7d595 100644 --- a/SimulatorMP.cpp +++ b/SimulatorMP.cpp @@ -399,6 +399,7 @@ SimulatorMP::Move( int& nStatus) // se non ce ne sono altre, sono alla fine if ( m_nOpId == GDB_ID_NULL) { OnProgramEnd() ; + ExecAllCmdData( nStatus) ; nStatus = MCH_SIM_END ; return false ; } @@ -1271,8 +1272,9 @@ SimulatorMP::ManageSingleMove( int& nStatus, double& dMove) const double MAX_LEN_STEP = 10. ; double dLenStep = Clamp( 0.1 * m_dTDiam, MIN_LEN_STEP, MAX_LEN_STEP) ; nStep = max( int( abs( dDiffAng * DEGTORAD * dRad) / dLenStep), 1) ; - const double ANG_STEP = 5. ; - if ( abs( dDiffAng) / nStep > ANG_STEP) + const double RAD_LIM = 20 ; + const double ANG_STEP = 5 ; + if ( dRad > RAD_LIM && abs( dDiffAng) / nStep > ANG_STEP) nStep = int( abs( dDiffAng) / ANG_STEP) ; } for ( int i = 1 ; i <= nStep ; ++ i) {