From 3aab2b94fcb76dacd189b30b6c456b5f5bc397dc Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sat, 16 Nov 2024 11:04:49 +0100 Subject: [PATCH] EgtMachKernel : - migliorie a simulazione MP. --- SimulatorMP.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) {