EgtMachKernel :

- in simulazione sistemato richiamo OnEndMove dopo errore di collisione alla fine del movimento.
This commit is contained in:
Dario Sassi
2024-04-29 08:43:10 +02:00
parent e97b9df6d4
commit c191d6d831
2 changed files with 14 additions and 5 deletions
+5 -1
View File
@@ -311,7 +311,11 @@ MachMgr::SetLastError( int nErr, const string& sErr)
{
m_nLastError = nErr ;
m_sLastError = sErr ;
string sInfo = m_sLastError + " (" + ToString( nErr) + ")" ;
string sInfo ;
if ( sErr._Starts_with( "Error"))
sInfo = m_sLastError + " (" + ToString( nErr) + ")" ;
else
sInfo = "Error " + ToString( nErr) + " : " + m_sLastError ;
LOG_ERROR( GetEMkLogger(), sInfo.c_str()) ;
return true ;
}
+9 -4
View File
@@ -1278,10 +1278,15 @@ Simulator::ManageSingleMove( int& nStatus, double& dMove)
int nErr ;
if ( ! OnCollision( nCdInd, nObjInd, nErr)) {
nStatus = CalcStatusOnError( nErr) ;
// Se arrivato a fine interpolazione movimento, salvo posizioni
if ( m_dCoeff > COEFF_LIM && m_bEnabAxes) {
for ( size_t i = 0 ; i < m_AxesName.size() ; ++ i)
m_AxesVal[i] = AxesEnd[i] ;
// Se arrivato a fine interpolazione movimento, salvo posizioni e segnalo
if ( m_dCoeff > COEFF_LIM) {
if ( m_bEnabAxes) {
for ( size_t i = 0 ; i < m_AxesName.size() ; ++ i)
m_AxesVal[i] = AxesEnd[i] ;
}
// richiamo gestione evento fine entità, senza gestirne eventuali errori
int nErr ;
OnMoveEnd( nErr) ;
}
return false ;
}