From 50f865b81c37bc52aeb98ccb35ab97f483a512ce Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Fri, 22 Mar 2013 09:09:19 +0100 Subject: [PATCH] add test for pushing bikes on footways etc --- features/bicycle/pushing.feature | 21 ++++++++++++++++++++- profiles/bicycle.lua | 1 + 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/features/bicycle/pushing.feature b/features/bicycle/pushing.feature index 7cc7deb46..13590d07b 100644 --- a/features/bicycle/pushing.feature +++ b/features/bicycle/pushing.feature @@ -102,4 +102,23 @@ Feature: Bike - Accessability of different way types | a | d | ab,bc,cd | head,right,left,destination | | d | a | cd,bc,ab | head,enter_contraflow,leave_contraflow,destination | | c | a | bc,ab | head,leave_contraflow,destination | - | d | b | cd,bc | head,enter_contraflow,destination | \ No newline at end of file + | d | b | cd,bc | head,enter_contraflow,destination | + + @todo + Scenario: Bike - Instructions when pushing bike on footway/pedestrian, etc. + Given the node map + | a | b | | + | | c | d | + + And the ways + | nodes | highway | + | ab | primary | + | bc | footway | + | cd | primary | + + When I route I should get + | from | to | route | turns | + | a | d | ab,bc,cd | head,right,left,destination | + | d | a | cd,bc,ab | head,enter_contraflow,leave_contraflow,destination | + | c | a | bc,ab | head,leave_contraflow,destination | + | d | b | cd,bc | head,enter_contraflow,destination | \ No newline at end of file diff --git a/profiles/bicycle.lua b/profiles/bicycle.lua index 56ab6d6cc..7231397b3 100644 --- a/profiles/bicycle.lua +++ b/profiles/bicycle.lua @@ -208,6 +208,7 @@ function way_function (way) if pedestrian_speeds[highway] then -- pedestrian-only ways and areas way.speed = pedestrian_speeds[highway] + way.backward_speed = way.speed-1 elseif man_made and man_made_speeds[man_made] then -- man made structures way.speed = man_made_speeds[man_made]