setStarter
Definition
-- @/lua/vehicle/controller/vehicleController/vehicleController.lua:657
local function setStarter(enabled)
if engine and engine.starterMaxAV then
if enabled and (engine.outputAV1 < engine.starterMaxAV * 0.8) then
engine:activateStarter()
else
engine:deactivateStarter()
end
end
end
Callers
@/ui/modules/apps/SimplePowertrainControl/app.js
// if (started === 1) {
// bngApi.activeObjectLua('controller.mainController.setStarter(true)')
// bngApi.activeObjectLua('controller.mainController.setStarter(false)')
// bngApi.activeObjectLua('controller.mainController.setStarter(true)')
// bngApi.activeObjectLua('controller.mainController.setStarter(false)')
// started = 0
// else if (started === 0) {
// bngApi.activeObjectLua('controller.mainController.setStarter(true)')
// bngApi.activeObjectLua('controller.mainController.setStarter(false)')
// bngApi.activeObjectLua('controller.mainController.setStarter(true)')
// bngApi.activeObjectLua('controller.mainController.setStarter(false)')
// started = 1
@/lua/vehicle/electrics.lua
controller.mainController.setEngineIgnition(false)
controller.mainController.setStarter(false)
elseif newIgnitionLevel == 2 then
controller.mainController.setEngineIgnition(true)
controller.mainController.setStarter(false)
elseif newIgnitionLevel == 3 then
controller.mainController.setEngineIgnition(true)
controller.mainController.setStarter(true)
end