[{"data":1,"prerenderedAt":504},["ShallowReactive",2],{"/docs/jobs/mechanicjob/features/jg-mileage-and-hud":3,"/docs/jobs/mechanicjob/features/jg-mileage-and-hud-surround":492,"/docs/jobs/mechanicjob/features/jg-mileage-and-hud-implemented-suggestions":503},{"id":4,"title":5,"body":6,"description":482,"extension":483,"head":484,"implementedSuggestions":484,"meta":485,"navigation":486,"path":487,"schemaOrg":484,"seo":488,"sitemap":489,"stem":490,"__hash__":491},"docs/1.docs/0.jobs/2.mechanicjob/3.features/15.jg-mileage-and-hud.md","JG Mileage and HUD",{"type":7,"value":8,"toc":472},"minimark",[9,18,23,43,118,121,173,176,183,237,243,247,320,327,332,336,339,364,375,378,382,387,400,407,413,428,439,443,468],[10,11,12,13,17],"p",{},"Sky Mechanic Job can count and save mileage itself, or read it from ",[14,15,16],"code",{},"jg-vehiclemileage",". The selected mileage can be displayed in the built-in Mileage HUD, JG HUD, or both. Using JG HUD does not require JG Vehicle Mileage.",[19,20,22],"h2",{"id":21},"choose-the-source-and-display","Choose the source and display",[10,24,25,26,29,30,34,35,38,39,42],{},"Open ",[14,27,28],{},"/jobconfig"," → ",[31,32,33],"strong",{},"Mechanic Jobs → Features"," when ",[14,36,37],{},"Config.UseJobConfigurator"," is enabled. Saved configurator values take priority over the matching defaults in ",[14,40,41],{},"config/config.lua",".",[44,45,46,62],"table",{},[47,48,49],"thead",{},[50,51,52,56,59],"tr",{},[53,54,55],"th",{},"Feature",[53,57,58],{},"Config key",[53,60,61],{},"Purpose",[63,64,65,81,99],"tbody",{},[50,66,67,73,78],{},[68,69,70],"td",{},[31,71,72],{},"Mileage HUD",[68,74,75],{},[14,76,77],{},"Config.ToggleFeatures.mileageHud",[68,79,80],{},"Shows the built-in Sky mileage display. Disabling it keeps mileage tracking, persistence, and wear active.",[50,82,83,88,93],{},[68,84,85],{},[31,86,87],{},"JG Mileage",[68,89,90],{},[14,91,92],{},"Config.ToggleFeatures.jgMileage",[68,94,95,96,98],{},"Reads mileage from ",[14,97,16],{}," while that resource is started. Requires JG Vehicle Mileage v2.1.1 or newer. Defaults to disabled.",[50,100,101,106,111],{},[68,102,103],{},[31,104,105],{},"JG HUD",[68,107,108],{},[14,109,110],{},"Config.ToggleFeatures.jgHud",[68,112,113,114,117],{},"Sends the selected mileage to a started ",[14,115,116],{},"jg-hud"," through the adapter below. Works with either mileage source. Defaults to disabled.",[10,119,120],{},"Use these combinations for common setups:",[44,122,123,136],{},[47,124,125],{},[50,126,127,130,132,134],{},[53,128,129],{},"Setup",[53,131,72],{},[53,133,87],{},[53,135,105],{},[63,137,138,151,162],{},[50,139,140,143,146,149],{},[68,141,142],{},"Sky mileage with the Sky display",[68,144,145],{},"On",[68,147,148],{},"Off",[68,150,148],{},[50,152,153,156,158,160],{},[68,154,155],{},"Sky mileage shown only in JG HUD",[68,157,148],{},[68,159,148],{},[68,161,145],{},[50,163,164,167,169,171],{},[68,165,166],{},"JG Vehicle Mileage shown only in JG HUD",[68,168,148],{},[68,170,145],{},[68,172,145],{},[10,174,175],{},"You can enable both display switches if you want both HUDs visible.",[10,177,178,179,182],{},"For Sky mileage shown only in JG HUD, set the three entries inside the existing ",[14,180,181],{},"Config.ToggleFeatures"," table when using file configuration:",[184,185,191],"pre",{"className":186,"code":187,"filename":188,"language":189,"meta":190,"style":190},"language-lua shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","mileageHud = false,\njgMileage = false,\njgHud = true,\n","sky_mechanicjob/config/config.lua","lua","",[14,192,193,212,224],{"__ignoreMap":190},[194,195,198,202,206,209],"span",{"class":196,"line":197},"line",1,[194,199,201],{"class":200},"sTEyZ","mileageHud ",[194,203,205],{"class":204},"sMK4o","=",[194,207,208],{"class":204}," false",[194,210,211],{"class":200},",\n",[194,213,215,218,220,222],{"class":196,"line":214},2,[194,216,217],{"class":200},"jgMileage ",[194,219,205],{"class":204},[194,221,208],{"class":204},[194,223,211],{"class":200},[194,225,227,230,232,235],{"class":196,"line":226},3,[194,228,229],{"class":200},"jgHud ",[194,231,205],{"class":204},[194,233,234],{"class":204}," true",[194,236,211],{"class":200},[10,238,239,240,242],{},"Keep the other feature entries. With the Job Configurator enabled, set the same switches in ",[14,241,28],{}," instead.",[19,244,246],{"id":245},"connect-jg-hud-once","Connect JG HUD once",[248,249,250,260,299,311],"ol",{},[251,252,253,254,257,258,42],"li",{},"Keep the resource folders named ",[14,255,256],{},"sky_mechanicjob"," and ",[14,259,116],{},[251,261,25,262,265,266,273,274,277,278],{},[14,263,264],{},"jg-hud/fxmanifest.lua",". Add the following line ",[31,267,268,269,272],{},"after its existing ",[14,270,271],{},"client_scripts"," block",", so it loads after ",[14,275,276],{},"framework/cl-functions.lua",":",[184,279,281],{"className":186,"code":280,"filename":264,"language":189,"meta":190,"style":190},"client_script \"@sky_mechanicjob/compat/jg_hud_mileage.lua\"\n",[14,282,283],{"__ignoreMap":190},[194,284,285,289,292,296],{"class":196,"line":197},[194,286,288],{"class":287},"s2Zo4","client_script",[194,290,291],{"class":204}," \"",[194,293,295],{"class":294},"sfazB","@sky_mechanicjob/compat/jg_hud_mileage.lua",[194,297,298],{"class":204},"\"\n",[251,300,301,302],{},"After installing the updated Mechanic files and saving the manifest, run these commands in the server console:",[184,303,309],{"className":304,"code":306,"filename":307,"language":308,"meta":190},[305],"language-text","refresh\nrestart sky_mechanicjob\nrestart jg-hud\n","Server console","text",[14,310,306],{"__ignoreMap":190},[251,312,313,314,316,317,319],{},"Enable ",[31,315,105],{}," in ",[14,318,28],{}," and choose the source/display combination above. Ensure JG HUD's own vehicle mileage display is enabled, then enter a vehicle as the driver.",[10,321,322,323,326],{},"The adapter uses JG HUD's ",[14,324,325],{},"Framework.Client.GetVehicleMileageInKm"," integration point. It supplies the selected Mechanic mileage in kilometres; JG HUD keeps its own unit conversion and formatting. When the Sky display integration is disabled or Mechanic Job stops, JG HUD uses its original mileage getter again.",[10,328,329,330,42],{},"Keep this manifest addition when updating JG HUD. If an update changes its mileage getter, review the adapter against that version's ",[14,331,276],{},[19,333,335],{"id":334},"resource-availability-and-saved-mileage","Resource availability and saved mileage",[10,337,338],{},"Mechanic Job checks the resource state before using either JG integration:",[340,341,342,351,357],"ul",{},[251,343,344,345,347,348,350],{},"If ",[31,346,87],{}," is enabled but ",[14,349,16],{}," is missing, starting, or stopped, Mechanic Job uses Sky's saved mileage and continues counting distance. It logs the unavailable resource state instead of calling its exports.",[251,352,353,354,356],{},"Once ",[14,355,16],{}," is started, the enabled integration reads JG mileage again.",[251,358,344,359,347,361,363],{},[31,360,105],{},[14,362,116],{}," is unavailable, mileage tracking and wear continue. The HUD connection becomes active when JG HUD starts with the adapter loaded.",[10,365,366,367,370,371,374],{},"Switching the source does ",[31,368,369],{},"not"," copy mileage between Sky's database and JG Vehicle Mileage. Review the existing readings before switching a production server. A valid JG reading, including ",[14,372,373],{},"0"," or a lower corrected value, remains authoritative while JG Mileage is active.",[10,376,377],{},"The HUD adapter only supplies a display value. It does not write to JG Vehicle Mileage or replace JG's saved mileage. No SQL migration is required for the HUD connection.",[19,379,381],{"id":380},"troubleshooting","Troubleshooting",[383,384,386],"h3",{"id":385},"jg-hud-shows-zero-or-a-different-value","JG HUD shows zero or a different value",[10,388,389,390,392,393,395,396,399],{},"Check that ",[31,391,105],{}," is enabled, ",[14,394,116],{}," is started, and the adapter line is present after the HUD's existing client scripts. Run ",[14,397,398],{},"refresh"," and restart JG HUD after changing its manifest. Test as the vehicle's driver after Mechanic Job has loaded the mileage.",[10,401,402,403,406],{},"Use ",[31,404,405],{},"JG Mileage = Off"," when Sky should remain the source. Turning that switch on selects JG Vehicle Mileage; it does not enable the HUD connection.",[383,408,410],{"id":409},"no-such-export-getmileagebyplate-in-resource-jg-vehiclemileage",[14,411,412],{},"No such export getMileageByPlate in resource jg-vehiclemileage",[10,414,415,416,257,423,42],{},"This means the export was not registered in the requested runtime. Confirm the exact resource name, its running state, and the installed JG Vehicle Mileage version. Check the first startup error and update the resource if its exports do not match the ",[417,418,422],"a",{"href":419,"rel":420},"https://docs.jgscripts.com/vehicle-mileage/exports/server-exports",[421],"nofollow","JG server API",[417,424,427],{"href":425,"rel":426},"https://docs.jgscripts.com/vehicle-mileage/exports/client-exports",[421],"JG client API",[10,429,430,431,434,435,438],{},"The availability check handles an absent or stopped provider. A resource reporting ",[14,432,433],{},"started"," can still have a startup error or an incompatible export API; those failures remain visible so the installation can be corrected. A ",[14,436,437],{},"JG mileage lookup failed for plate"," error is a separate case: the export exists, but JG returned no mileage record for that plate.",[19,440,442],{"id":441},"related-pages","Related pages",[340,444,445,451,457,463],{},[251,446,447],{},[417,448,450],{"href":449},"./vehicle-systems","Vehicle Systems",[251,452,453],{},[417,454,456],{"href":455},"../setup/configuration","Configuration",[251,458,459],{},[417,460,462],{"href":461},"../reference/exports","Exports",[251,464,465],{},[417,466,381],{"href":467},"../troubleshooting",[469,470,471],"style",{},"html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}",{"title":190,"searchDepth":197,"depth":214,"links":473},[474,475,476,477,481],{"id":21,"depth":214,"text":22},{"id":245,"depth":214,"text":246},{"id":334,"depth":214,"text":335},{"id":380,"depth":214,"text":381,"children":478},[479,480],{"id":385,"depth":226,"text":386},{"id":409,"depth":226,"text":412},{"id":441,"depth":214,"text":442},"Choose the mileage source and display Sky or JG Vehicle Mileage readings in JG HUD independently.","md",null,{},true,"/docs/jobs/mechanicjob/features/jg-mileage-and-hud",{"title":5,"description":482},{"loc":487},"1.docs/0.jobs/2.mechanicjob/3.features/15.jg-mileage-and-hud","tz3erkY69cJG7J6Dpz9UNeScu5wlFi6pWIpe3XoM5Ko",[493,499],{"title":494,"path":495,"stem":496,"description":497,"icon":498,"children":-1},"Mobile Dyno","/docs/jobs/mechanicjob/features/mobile-dyno","1.docs/0.jobs/2.mechanicjob/3.features/14.mobile-dyno","Bring performance testing into your workshop with a mobile test bench, live screens, cooling controls, and four test profiles.","i-lucide-gauge",{"title":450,"path":500,"stem":501,"description":502,"children":-1},"/docs/jobs/mechanicjob/features/vehicle-systems","1.docs/0.jobs/2.mechanicjob/3.features/2.vehicle-systems","Configure mileage, diagnostics, wear, vehicle care, wheel damage, history, and electric vehicles.",[],1791480743712]