local gearT = {
    [-1] = "R",
    [0] = "N",
    [1] = "D",
    [2] = "D",
    [3] = "D",
    [4] = "D",
    [5] = "D",
    [6] = "D",
    [7] = "D",
    [8] = "D"
    
}

local white = rgb(1,1,1)

function update(dt)
    display.text({ text = math.floor(car.speedKmh), pos = vec2(-10, 247), letter = vec2(65, 130), font = 'e92_big', color = white, alignment =1, width = 251, spacing = 1})
    display.text({ text = gearT[car.gear], pos = vec2(53.5, 505.2), letter = vec2(30, 60), font = 'e92_big', color = white, alignment =0.5, width = 0, spacing = 1 })
    display.text({ text = string.format("%01d", car.distanceDrivenTotalKm/ 1.609344),pos = vec2(255, 513), letter = vec2(25, 50), font = 'e92_big', color = white, alignment =0.0, width = 0, spacing = 1 })
    display.text({ text = string.format("%01d", car.distanceDrivenSessionKm/ 1.609344), pos = vec2(275, 562), letter = vec2(25, 50), font = 'e92_big', color = white, alignment =0.0, width = 0, spacing = 1 })
    display.text({ text = string.format("%01d:%02d", sim.timeHours, sim.timeMinutes), pos = vec2(-115, 15), letter = vec2(25, 50), font = 'e92_big', color = white, alignment =1, width = 265, spacing = 1 }) 
    display.text({ text ="PM", pos = vec2(-65, 22), letter = vec2(15, 35), font = 'e92_big', color = white, alignment =1, width = 265, spacing = 8 }) 
    display.text({ text ="Speed", pos = vec2(146, 195), letter = vec2(22, 50), font = 'e92_big', color = white, alignment =0, width = 0, spacing = 1 }) 
    display.text({ text ="MPH", pos = vec2(256, 305), letter = vec2(20, 40), font = 'e92_big', color = white, alignment =0, width = 0, spacing = 5 }) 
   end



  
   