EgtExecutor :

- corretto errore in funzione Lua EgtGetCurrSetup.
This commit is contained in:
Dario Sassi
2017-02-06 12:21:10 +00:00
parent 821085c04d
commit b3e99dcc29
+21 -20
View File
@@ -273,24 +273,6 @@ LuaGetCurrMachGroup( lua_State* L)
return 1 ;
}
//-------------------------------------------------------------------------------
// Setup
//-------------------------------------------------------------------------------
static int
LuaGetCurrSetup( lua_State* L)
{
// nessun parametro
LuaClearStack( L) ;
// recupero l'identificativo del gruppo di attrezzaggio della macchinata corrente
int nSetupId = ExeGetCurrPhase() ;
// restituisco il risultato
if ( nSetupId != GDB_ID_NULL)
LuaSetParam( L, nSetupId) ;
else
LuaSetParam( L) ;
return 1 ;
}
//-------------------------------------------------------------------------------
// Phases
//-------------------------------------------------------------------------------
@@ -1336,6 +1318,26 @@ LuaTdbSave( lua_State* L)
//-----------------------------------------------------------------------------
// Setup
//-----------------------------------------------------------------------------
//-------------------------------------------------------------------------------
// Setup
//-------------------------------------------------------------------------------
static int
LuaGetCurrSetup( lua_State* L)
{
// nessun parametro
LuaClearStack( L) ;
// recupero l'identificativo del gruppo di attrezzaggio della macchinata corrente
int nSetupId = ExeGetCurrSetup() ;
// restituisco il risultato
if ( nSetupId != GDB_ID_NULL)
LuaSetParam( L, nSetupId) ;
else
LuaSetParam( L) ;
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaGetDefaultSetupName( lua_State* L)
{
@@ -3015,8 +3017,6 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtSetCurrMachGroup", LuaSetCurrMachGroup) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtResetCurrMachGroup", LuaResetCurrMachGroup) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCurrMachGroup", LuaGetCurrMachGroup) ;
// Setup
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCurrSetup", LuaGetCurrSetup) ;
// Phases
bOk = bOk && luaMgr.RegisterFunction( "EgtAddPhase", LuaAddPhase) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSetCurrPhase", LuaSetCurrPhase) ;
@@ -3079,6 +3079,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtTdbReload", LuaTdbReload) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtTdbSave", LuaTdbSave) ;
// Setup
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCurrSetup", LuaGetCurrSetup) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetDefaultSetupName", LuaGetDefaultSetupName) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtImportSetup", LuaImportSetup) ;
// Machinings database