EgtMachKernel 2.6i1 :

- introduzione secondo simulatore sperimentale per macchine multiprocesso.
This commit is contained in:
Dario Sassi
2024-09-05 08:29:20 +02:00
parent ac72518e44
commit 4b835a27be
17 changed files with 5411 additions and 2635 deletions
+12 -9
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2024
//----------------------------------------------------------------------------
// File : MachineLua.cpp Data : 05.08.24 Versione : 2.6h1
// File : MachineLua.cpp Data : 01.09.24 Versione : 2.6i1
// Contenuto : Implementazione gestione macchina : funzioni Lua.
//
//
@@ -9,6 +9,7 @@
// Modifiche : 06.05.15 DS Creazione modulo.
// 26.04.20 DS Aggiunta gestione TcPos.
// 05.08.24 DS Aggiunta gestione SpecialEstimate.
// 01.09.24 DS SpecialEstimate è diventato MultiProcess.
//
//----------------------------------------------------------------------------
@@ -35,7 +36,7 @@ static const string FLD_AXISMAXROTADJ = "AxisMaxRotAdj" ;
static const string FLD_EXITMAXADJUST = "ExitMaxAdjust" ;
static const string FLD_EXITMAXROTADJ = "ExitMaxRotAdj" ;
static const string FLD_ANGDELTAMINFORHOME = "AngDeltaMinForHome" ;
static const string FLD_SPECIALESTIMATE = "SpecialEstimate" ;
static const string FLD_MULTIPROCESS = "MultiProcess" ;
static const string FLD_NAME = "Name" ;
static const string FLD_PARENT = "Parent" ;
static const string FLD_GEO = "Geo" ;
@@ -344,9 +345,9 @@ Machine::LuaEmtGeneral( lua_State* L)
// lettura eventuale campo 'AngDeltaForHome' dalla tabella (default INFINITO)
double dAngDeltaMinForHome = INFINITO ;
LuaGetTabFieldParam( L, 1, FLD_ANGDELTAMINFORHOME, dAngDeltaMinForHome) ;
// lettura eventuale campo 'SpecialEstimate' dalla tabella (default false)
bool bSpecialEstimate = false ;
LuaGetTabFieldParam( L, 1, FLD_SPECIALESTIMATE, bSpecialEstimate) ;
// lettura eventuale campo 'MultiProcess' dalla tabella (default false)
bool bMultiProcess = false ;
LuaGetTabFieldParam( L, 1, FLD_MULTIPROCESS, bMultiProcess) ;
LuaClearStack( L) ;
// info
@@ -396,8 +397,8 @@ Machine::LuaEmtGeneral( lua_State* L)
// imposto minima differenza angolare da posizione precedente per stare vivino a posizione home
m_pMchLua->m_dAngDeltaMinForHome = dAngDeltaMinForHome ;
// imposto flag per stima speciale
m_pMchLua->m_bSpecialEstimate = bSpecialEstimate ;
// imposto flag per macchina multiprocesso
m_pMchLua->m_bMultiProcess = bMultiProcess ;
return 0 ;
}
@@ -1553,7 +1554,9 @@ Machine::LuaEmtMoveAxes( lua_State* L)
// assegno risultato
if ( nRes == SIM_AXMV_RES_STOP)
return luaL_error( L, "STOP") ;
else
else {
LuaSetParam( L, ( nRes == SIM_AXMV_RES_OK)) ;
return 1 ;
LuaSetParam( L, m_pMchLua->GetMultiProcess()) ;
}
return 2 ;
}