fix(marker): arbejdsbredde = Courseplays egen workWidth-indstilling når den findes (v1.21.2.0)
In-game 25/9: variabel bredde gav 20,8 m for BiG M 450, Courseplay-HUD'en viser 40,8 m.
This commit is contained in:
@@ -26,5 +26,14 @@ check("W2 AI-markører", ADCpBridge.getWorkWidth(plain), 9.5)
|
||||
local mower = {getVariableWorkWidth = function(_, isLeft) return isLeft and 20.4 or -20.4, nil, true end}
|
||||
check("W3 selvkørende", ADCpBridge.getWorkWidth(mower), 40.8)
|
||||
|
||||
-- W4: Courseplays egen bredde (HUD'en) vinder — det er den marken køres med
|
||||
local cpVehicle = {getVariableWorkWidth = function(_, isLeft) return isLeft and 20.4 or -0.4, nil, true end,
|
||||
getCourseGeneratorSettings = function() return {workWidth = {getValue = function() return 40.8 end}} end}
|
||||
check("W4 Courseplay-bredde", ADCpBridge.getWorkWidth(cpVehicle), 40.8)
|
||||
-- W5: Courseplay-indstilling 0/ugyldig -> egen beregning
|
||||
local zeroCp = {getVariableWorkWidth = function(_, isLeft) return isLeft and 5 or -5, nil, true end,
|
||||
getCourseGeneratorSettings = function() return {workWidth = {getValue = function() return 0 end}} end}
|
||||
check("W5 CP 0 -> egen beregning", ADCpBridge.getWorkWidth(zeroCp), 10)
|
||||
|
||||
print(failures == 0 and "\nALLE TESTS OK" or ("\n" .. failures .. " FEJL"))
|
||||
os.exit(failures == 0 and 0 or 1)
|
||||
|
||||
Reference in New Issue
Block a user