local M = {}

local function init()
  if electrics.values.ignitionLevel == 2 and electrics.values.crownvictrip == 0 then
    electrics.values.crownvic_odometer = 1
  else
    electrics.values.crownvic_odometer = 0
  end
end

local function reset()
  init()
end

local function updateGFX(dt)
    if electrics.values.ignitionLevel == 2 then
        if electrics.values.crownvictrip == 0 then
            electrics.values.crownvic_odometer = 0.49
        else
            electrics.values.crownvic_odometer = 1.0
        end
    else
        electrics.values.crownvic_odometer = 0
    end
end

M.onInit = init
M.onReset = init
M.updateGFX = updateGFX

return M