From 7ff68792d77afb14e0afcc4c657805fee34aaa06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Rodrigo?= Date: Wed, 6 Jun 2018 11:07:01 +0200 Subject: [PATCH] Add helper for maxlength into measure.lua --- profiles/lib/measure.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/profiles/lib/measure.lua b/profiles/lib/measure.lua index 88bbcbd74..6bcff08f8 100644 --- a/profiles/lib/measure.lua +++ b/profiles/lib/measure.lua @@ -70,7 +70,14 @@ function Measure.get_max_width(raw_value) end end ---- Get maxweight of specified way in kilogramms +--- Get maxlength of specified way in meters. +function Measure.get_max_length(raw_value) + if raw_value then + return Measure.parse_value_meters(raw_value) + end +end + +--- Get maxweight of specified way in kilogramms. function Measure.get_max_weight(raw_value) if raw_value then return Measure.parse_value_kilograms(raw_value)