Código: Seleccionar todo
if ( Call( "GetIsEngineWithKey" ) == 1 ) then
if gDriven == 0 then
gDriven = 1
Call( "*:SetControlValue", "Active", 0, 1 )
end
else
if gDriven == 1 then
gDriven = 0
Call( "*:SetControlValue", "Active", 0, 0 )
end
end
-- control de amperaje en motores de traccion
if gDriven == 1 then
amp=Call( "*:GetControlValue", "Ammeter", 0 )
if amp > 3000 then -- este valor es configurable
Call ( "*:SetControlValue", "Regulator", 0, 0)
end
end