EgtExecutor 1.8b7 :

- aggiunta funzione Exe e Lua GetRotAxisBlocked.
This commit is contained in:
Dario Sassi
2017-03-02 07:57:17 +00:00
parent 45c2e7a8b1
commit 4ac17ec65b
3 changed files with 35 additions and 0 deletions
+10
View File
@@ -2310,6 +2310,16 @@ ExeSetRotAxisBlock( const string& sAxis, double dVal)
return pMachMgr->SetRotAxisBlock( sAxis, dVal) ;
}
//----------------------------------------------------------------------------
bool
ExeGetRotAxisBlocked( int nInd, string& sAxis, double& dVal)
{
IMachMgr* pMachMgr = GetCurrMachMgr() ;
VERIFY_MACHMGR( pMachMgr, false)
// recupero dati bloccaggio asse in posizione nInd (0-based)
return pMachMgr->GetRotAxisBlocked( nInd, sAxis, dVal) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetCalcTool( string& sTool)
BIN
View File
Binary file not shown.
+25
View File
@@ -2605,6 +2605,30 @@ LuaSetRotAxisBlock( lua_State* L)
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaGetRotAxisBlocked( lua_State* L)
{
// 1 parametro : nInd ( 0-based)
int nInd ;
LuaCheckParam( L, 1, nInd)
LuaClearStack( L) ;
// recupero dati bloccaggio asse in posizione nInd
string sAxis ;
double dVal ;
bool bOk = ExeGetRotAxisBlocked( nInd, sAxis, dVal) ;
// restituisco il risultato
if ( bOk) {
LuaSetParam( L, sAxis) ;
LuaSetParam( L, dVal) ;
}
else {
LuaSetParam( L) ;
LuaSetParam( L) ;
}
return 2 ;
}
//-------------------------------------------------------------------------------
static int
LuaGetCalcTool( lua_State* L)
@@ -3200,6 +3224,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtSetCalcTable", LuaSetCalcTable) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSetCalcTool", LuaSetCalcTool) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSetRotAxisBlock", LuaSetRotAxisBlock) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetRotAxisBlocked", LuaGetRotAxisBlocked) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCalcTool", LuaGetCalcTool) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCalcAngles", LuaGetCalcAngles) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCalcPositions", LuaGetCalcPositions) ;