Skip to content

Commit

Permalink
fix speed_for_path in foot profile
Browse files Browse the repository at this point in the history
  • Loading branch information
datendelphin committed Dec 17, 2022
1 parent c97c085 commit 2daa6d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions foot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ function setup()
},

speed_path = {
sac_scale = { hiking = 0.5,
mountain_hiking = 0,
demanding_mountain_hiking = 0,
alpine_hiking = 0,
demanding_alpine_hiking = 0
sac_scale = { hiking = {0.5, 3.5},
mountain_hiking = {0,0},
demanding_mountain_hiking = {0,0},
alpine_hiking = {0,0},
demanding_alpine_hiking = {0,0}
},
bicycle = { designated = 0.5, yes = 0.9 }
bicycle = { designated = {0.5, 4.5}, yes = {0.9, 4.5} }
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/way_handlers_weight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ end
-- speed on paths
function WayHandlers.adjust_speed_for_path(profile, way, result, data)
if way:get_value_by_key("highway") == 'path' then
for k,v in ipairs(profile.speed_path) do
for k,v in pairs(profile.speed_path) do
local tag = way:get_value_by_key(k)
if tag ~= '' then
if v == nil then
Expand Down

0 comments on commit 2daa6d8

Please sign in to comment.