From f99369f3619a3843b8b967309e3fa9fd292d79a8 Mon Sep 17 00:00:00 2001 From: senator Date: Tue, 15 Dec 2009 14:00:18 +0000 Subject: added phoropter integration with pentominos --- server/xml/macros/manifest_refraktion-1.0.xml | 110 ++++++++++++++++++++++++-- 1 file changed, 103 insertions(+), 7 deletions(-) (limited to 'server/xml/macros') diff --git a/server/xml/macros/manifest_refraktion-1.0.xml b/server/xml/macros/manifest_refraktion-1.0.xml index 46b6f35..37cf4b0 100644 --- a/server/xml/macros/manifest_refraktion-1.0.xml +++ b/server/xml/macros/manifest_refraktion-1.0.xml @@ -35,7 +35,7 @@ return out - + @@ -76,6 +76,102 @@ end return value, timestamp, source + + -- Returning 0, 0 invalidates the result + value = 0 + timestamp = 0 + source = 0 + + if(phoroptor and phoroptor.osin and phoroptor.osin.sph and phoroptor.osin.sph.value and phoroptor.osin.sph.timestamp) + then + value = phoroptor.osin.sph.value + -- convert . to , + value = string.gsub(value, '[.]', ',') + timestamp = phoroptor.osin.sph.timestamp + source = phoroptor.osin.sph.source + end + return value, timestamp, source + + + -- Returning 0, 0 invalidates the result + value = 0 + timestamp = 0 + source = 0 + + if(phoroptor and phoroptor.osin and phoroptor.osin.cyl and phoroptor.osin.cyl.value and phoroptor.osin.cyl.timestamp) + then + value = phoroptor.osin.cyl.value + -- convert . to , + value = string.gsub(value, '[.]', ',') + timestamp = phoroptor.osin.cyl.timestamp + source = phoroptor.osin.cyl.source + end + return value, timestamp, source + + + -- Returning 0, 0 invalidates the result + value = 0 + timestamp = 0 + source = 0 + + if(phoroptor and phoroptor.osin and phoroptor.osin.axis and phoroptor.osin.axis.value and phoroptor.osin.axis.timestamp) + then + value = phoroptor.osin.axis.value + -- convert . to , + value = string.gsub(value, '[.]', ',') + timestamp = phoroptor.osin.axis.timestamp + source = phoroptor.osin.axis.source + end + return value, timestamp, source + + + -- Returning 0, 0 invalidates the result + value = 0 + timestamp = 0 + source = 0 + + if(phoroptor and phoroptor.osin and phoroptor.odxt.sph and phoroptor.odxt.sph.value and phoroptor.odxt.sph.timestamp) + then + value = phoroptor.odxt.sph.value + -- convert . to , + value = string.gsub(value, '[.]', ',') + timestamp = phoroptor.odxt.sph.timestamp + source = phoroptor.odxt.sph.source + end + return value, timestamp, source + + + -- Returning 0, 0 invalidates the result + value = 0 + timestamp = 0 + source = 0 + + if(phoroptor and phoroptor.osin and phoroptor.odxt.cyl and phoroptor.odxt.cyl.value and phoroptor.odxt.cyl.timestamp) + then + value = phoroptor.odxt.cyl.value + -- convert . to , + value = string.gsub(value, '[.]', ',') + timestamp = phoroptor.odxt.cyl.timestamp + source = phoroptor.odxt.cyl.source + end + return value, timestamp, source + + + -- Returning 0, 0 invalidates the result + value = 0 + timestamp = 0 + source = 0 + + if(phoroptor and phoroptor.osin and phoroptor.odxt.axis and phoroptor.odxt.axis.value and phoroptor.odxt.axis.timestamp) + then + value = phoroptor.odxt.axis.value + -- convert . to , + value = string.gsub(value, '[.]', ',') + timestamp = phoroptor.odxt.axis.timestamp + source = phoroptor.odxt.axis.source + end + return value, timestamp, source +