local gearT = {
    [-1] = "R",
    [0] = "P",
    [1] = "M1",
    [2] = "M2",
    [3] = "M3",
    [4] = "M4",
    [5] = "M5",
    [6] = "M6",
    [7] = "M7",
    [8] = "M8"
    
}

local white = rgb(1,1,1)

function update(dt)
    display.text({ text = math.floor(car.speedKmh), pos = vec2(0,0), letter = vec2(25, 50), font = 'e92_big', color = white, alignment =0.5, width = 251, spacing = 1})
    display.text({ text = string.format("%02.1f", car.distanceDrivenSessionKm/ 1.609344), pos = vec2(0, 0), letter = vec2(25, 50), font = 'e92_big', color = white, alignment =1, width = 0, spacing = .01 })
    display.text({ text = gearT[car.gear], pos = vec2(963.7, 615.1), letter = vec2(55, 120), font = 'rs6', color = white, alignment =0.5, width = 250, spacing = 15 })
    display.text({ text = string.format("%05d", car.distanceDrivenTotalKm), pos = vec2(139, 343), letter = vec2(25, 50), font = 'e92_big', color = white, alignment =0.0, width = 0, spacing = 1 })
    display.text({ text = string.format("%05.1f", car.distanceDrivenSessionKm), pos = vec2(0, 0), letter = vec2(25, 50), font = 'e92_big', color = white, alignment =0.0, width = 0, spacing = 1 })
    display.text({ text = string.format("%02d:%02d", sim.timeHours, sim.timeMinutes), pos = vec2(0, 0), letter = vec2(31, 35), font = 'e92_big', color = white, alignment =0.0, width = 0, spacing = 1 })
    display.text({ text = string.format("%.1f", car.fuel), pos = vec2(0, 0), letter = vec2(25, 50), font = 'e92_big', color = white, alignment =0.0, width = 0, spacing = 1 })
   end



  
   