From 05984a9eba01bf0ce7567db8823e7d333b561412 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 28 Jul 2020 16:19:17 +0000 Subject: [PATCH] =?UTF-8?q?EgtMachKernel=202.2g6=20:=20-=20ora=20se=20OnSp?= =?UTF-8?q?ecialApplyDisposition=20assegna=20un=20valore=20negativo=20a=20?= =?UTF-8?q?EMC.ERR=20=C3=A8=20un=20warning=20e=20non=20un=20errore.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Disposition.cpp | 10 ++++++++-- EgtMachKernel.rc | Bin 11774 -> 11774 bytes 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Disposition.cpp b/Disposition.cpp index 366fbd7..a86eeaf 100644 --- a/Disposition.cpp +++ b/Disposition.cpp @@ -39,6 +39,7 @@ using namespace std ; // 2010 = "Error in Disposition : link outstroke xxx" // 2051 = "Table Ref1 changed : (xyz) -> (XYZ)" // 2052 = "Warning in Disposition : No shifts" +// 2053 = "Warning in OnSpecialApplyDisposition (xxx)" //---------------------------------------------------------------------------- static string DIS_TABLE = "Tab" ; @@ -1317,7 +1318,7 @@ Disposition::SpecialApply( bool bRecalc) static const string EVAR_TABNAME = ".TABNAME" ; // IN (string) nome della tavola macchina static const string EVAR_DISPID = ".DISPID" ; // IN (int) identificativo della disposizione static const string EVAR_PHASE = ".PHASE" ; // IN (int) indice fase - static const string EVAR_ERROR = ".ERR" ; // OUT (int) codice di errore ( 0 = ok) + static const string EVAR_ERROR = ".ERR" ; // OUT (int) codice di errore ( 0 = ok, > 0 errore, < 0 warning) static const string EVAR_HEAD = ".HEAD" ; // OUT (string) nome della testa static const string EVAR_EXIT = ".EXIT" ; // OUT (int) indice dell'uscita static const string EVAR_TCPOS = ".TCPOS" ; // OUT (string) nome della posizione nel TC @@ -1348,12 +1349,17 @@ Disposition::SpecialApply( bool bRecalc) // reset bOk = bOk && pMch->LuaResetGlobVar( EMC_VAR) ; // segnalo errori ed esco - if ( ! bOk || nErr != 0) { + if ( ! bOk || nErr > 0) { m_nShifts = - 1 ; string sOut = " Error in " + ON_SPECIAL_APPLY + " (" + ToString( nErr) + ")" ; m_pMchMgr->SetLastError( 2006, sOut) ; return false ; } + // recupero eventuale warning + else if ( nErr < 0) { + string sOut = " Warning in " + ON_SPECIAL_APPLY + " (" + ToString( nErr) + ")" ; + m_pMchMgr->SetWarning( 2053, sOut) ; + } // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! SpecialUpdate()) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 4fbd5966b2b03934c04f1af9cf5e812134bc9769..10f1979fb26fc78a83971963db5645d36ac9121f 100644 GIT binary patch delta 97 zcmewt{V#gMFE&QA&A-`fnHkL{Ka|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmUTDBd7oX delta 97 zcmewt{V#gMFE&Qg&A-`fnHfzdKa|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmUO4BcK2P