Eliminati file Bak

This commit is contained in:
Nicola Pievani
2021-05-11 12:33:25 +02:00
parent 25f9d1dd4b
commit e5b58ee76f
3 changed files with 0 additions and 1918 deletions
@@ -1,13 +0,0 @@
require( 'EgtBase')
EgtEnableDebug( true)
package.path = package.path.. ";".. EgtGetSourceDir().. "Test Carrelli ONE.lua"
local S = require( "Test Carrelli ONE")
-- Definisco la cartella di destinazione dei file comandi salvati in modalità non batch
S.NomeDirettorioBatch = EgtGetSourceDir().."TEST"
--
S.PreparaSimulazione()
S.ResetTrip()
-- prepara i comandi
local A = dofile( S.NomeFileCarrelli)
S.VerificaPoiszionamentoMorse()
@@ -1,92 +0,0 @@
-- Include
require( 'EgtBase')
EgtEnableDebug( false)
local Results = {}
local ComandiCovertitore = {}
-- File contenente l'elenco dei comandi
--"C:\\Users\\Nicola\\Desktop\\Beam\\Carrreli ONE\\"
Results.NomeFileCompleto =EgtGetSourceDir().."Comandi.lua"
Results.DirettorioBatch = EgtGetSourceDir().."ComandiTestBatch"
local function StampaComandi( TabellaComandi, NomeFunzione, NomeTest)
if not EgtExistsDirectory( Results.DirettorioBatch) then
EgtCreateDirectory( Results.DirettorioBatch)
-- end
local file = io.open( Results.NomeFileCompleto, "w")
if not TabellaComandi then
return
end
if NomeFunzione then
file:write( '-- Funzione Test: '..NomeFunzione..', '..NomeTest ..'\n')
end
file:write( 'local S = require( "Test Carrelli ONE")\n')
file:write( 'S.PosizioniAttuali()\n\n')
for i = 1, #TabellaComandi, 1 do
file:write( TabellaComandi[i], "\n")
print( TabellaComandi[i])
end
file:close()
EgtCopyFile( Results.NomeFileCompleto, Results.DirettorioBatch.. "/Cmd_"..EgtTrim( NomeFunzione)..'_'..EgtTrim( NomeTest).. ".lua" )
end
--
local function StampaMessaggio(Titolo, Messaggio)
local sOutBoxStart = 'if not EgtOutBox( "'
local sOutBoxEnd = '") then \n return \nend'
local sMsg = sOutBoxStart ..Messaggio ..'","' ..Titolo ..sOutBoxEnd
return sMsg
end
--
function Results.Convertitore( vCmd, NomeFunzione, NomeTest)
local Tabella = {}
if not vCmd or #vCmd[1] < 2 then
return
end
for j = 1, #vCmd, 1 do
Tabella = vCmd[j]
if Tabella[1] == 12 then
if Tabella[2] == 0 then
table.insert( ComandiCovertitore, 'S.Apri_Morsa("2")')
else
table.insert( ComandiCovertitore, 'S.Chiudi_Morsa("2")')
end
elseif Tabella[1] == 11 then
if Tabella[2] == 0 then
table.insert( ComandiCovertitore, 'S.Apri_Morsa("1")')
else
table.insert( ComandiCovertitore, 'S.Chiudi_Morsa("1")')
end
elseif Tabella[1] == 1 or Tabella[1] == 2 or Tabella[1] == 3 then
local Y1Comando = "_,_"
local Y2Comando = "_,_"
local TComando = "_"
for i = 2, #Tabella, 2 do
if Tabella[i] == 'Y1' then
Y1Comando = '"1",'..tostring( Tabella[i+1])
--table.insert( ComandiCovertitore, 'S.Trasla_Morsa("1", '.. Tabella[ i + 1]..')')
elseif Tabella[i] == 'Y2' then
Y2Comando = '"2",'..tostring( Tabella[i+1])
--table.insert( ComandiCovertitore, 'S.Trasla_Morsa("2", '.. Tabella[ i + 1]..')')
elseif Tabella[i] == 'T' then
TComando = tostring( Tabella[i+1])
--table.insert( ComandiCovertitore, 'S.Trasla_Trave( '.. Tabella[ i + 1]..')')
end
end
table.insert( ComandiCovertitore, 'S.Trasla_Morse_Trave('..Y1Comando..','..Y2Comando..','..TComando..')')
if Tabella[1] == 1 then
table.insert( ComandiCovertitore, 'if not EgtOutBox( "Morsa aperta' ..tostring( Tabella[3])..'","( )") then \n return \nend')
elseif Tabella[1] == 2 then
table.insert( ComandiCovertitore, 'if not EgtOutBox( "Delta Morsa chiusa' ..tostring( Tabella[3] - Tabella[5])..'","( )") then \n return \nend')
else
table.insert( ComandiCovertitore, 'if not EgtOutBox( "DeltaY1 =' ..tostring( Tabella[3] - Tabella[7]) .. ' DeltaY2='..tostring( Tabella[5] - Tabella[7])..'","( )") then \n return \nend')
end
end
end
StampaComandi( ComandiCovertitore, NomeFunzione, NomeTest)
end
return Results
--Convertitore( vCmd)
File diff suppressed because it is too large Load Diff