diff options
| author | senator <senator> | 2009-12-09 13:16:36 +0000 | 
|---|---|---|
| committer | senator <senator> | 2009-12-09 13:16:36 +0000 | 
| commit | b3788942a76b42df450d5ccd5d5fa2604147b2b4 (patch) | |
| tree | 0bebfe2578bd375d9813fcd5bdfcd9dccc4ded33 | |
| parent | fbe12b48ece0bd43e6b965199092fefa32648d12 (diff) | |
adjusted lensmeter maps. it should now work with the lensmeter data export
| -rw-r--r-- | server/xml/macros/egen_brille-1.0.xml | 84 | 
1 files changed, 58 insertions, 26 deletions
| diff --git a/server/xml/macros/egen_brille-1.0.xml b/server/xml/macros/egen_brille-1.0.xml index 964aaeb..14df7db 100644 --- a/server/xml/macros/egen_brille-1.0.xml +++ b/server/xml/macros/egen_brille-1.0.xml @@ -80,67 +80,99 @@        end        return value, timestamp, source      </map> -    <map name="brillemaaler.sf.osin"> +    <map name="lensmeter.osin.sph">        -- Returning 0, 0 invalidates the result        value = 0        timestamp = 0        source = 0 -      if(lensmeter and brillemaaler.osin and brillemaaler.sf.osin and brillemaaler.sf.value.osin and brillemaaler.sf.timestamp.osin) +      if(lensmeter and lensmeter.osin and lensmeter.osin.sph and lensmeter.osin.sph.value and lensmeter.osin.sph.timestamp)        then -        value = brillemaaler.sf.value.osin +        value = lensmeter.osin.sph.value          -- convert . to ,          value = string.gsub(value, '[.]', ',') -        timestamp = brillemaaler.sf.timestamp.osin -        source = brillemaaler.sf.osin.source +        timestamp = lensmeter.osin.sph.timestamp +        source = lensmeter.osin.sph.source        end        return value, timestamp, source      </map> -    <map name="brillemaaler.cyl.osin"> +    <map name="lensmeter.osin.cyl">        -- Returning 0, 0 invalidates the result        value = 0        timestamp = 0        source = 0 -      if(lensmeter and brillemaaler.osin and brillemaaler.cyl.osin and brillemaaler.cyl.value.osin and brillemaaler.cyl.timestamp.osin) +      if(lensmeter and lensmeter.osin and lensmeter.osin.cyl and lensmeter.osin.cyl.value and lensmeter.osin.cyl.timestamp)        then -        value = brillemaaler.cyl.value.osin +        value = lensmeter.osin.cyl.value          -- convert . to ,          value = string.gsub(value, '[.]', ',') -        timestamp = brillemaaler.cyl.timestamp.osin -        source = brillemaaler.cyl.osin.source +        timestamp = lensmeter.osin.cyl.timestamp +        source = lensmeter.osin.cyl.source        end        return value, timestamp, source      </map> -    <map name="brillemaaler.sf.odxt"> +    <map name="lensmeter.osin.axis"> +      -- Returning 0, 0 invalidates the result +      value = 0 +      timestamp = 0 +      source = 0 + +      if(lensmeter and lensmeter.osin and lensmeter.osin.axis and lensmeter.osin.axis.value and lensmeter.osin.axis.timestamp) +      then +        value = lensmeter.osin.axis.value +        -- convert . to , +        value = string.gsub(value, '[.]', ',') +        timestamp = lensmeter.osin.axis.timestamp +        source = lensmeter.osin.axis.source +      end +      return value, timestamp, source +    </map> +    <map name="lensmeter.odxt.sph">        -- Returning 0, 0 invalidates the result        value = 0        timestamp = 0        source = 0 -      if(lensmeter and brillemaaler.odxt and brillemaaler.sf.odxt and brillemaaler.sf.value.odxt and brillemaaler.sf.timestamp.odxt) +      if(lensmeter and lensmeter.odxt and lensmeter.odxt.sph and lensmeter.odxt.sph.value and lensmeter.odxt.sph.timestamp)        then -        value = brillemaaler.sf.value.odxt +        value = lensmeter.odxt.sph.value          -- convert . to ,          value = string.gsub(value, '[.]', ',') -        timestamp = brillemaaler.sf.timestamp.odxt -        source = brillemaaler.sf.odxt.source +        timestamp = lensmeter.odxt.sph.timestamp +        source = lensmeter.odxt.sph.source        end        return value, timestamp, source      </map> -    <map name="brillemaaler.cyl.odxt"> +    <map name="lensmeter.odxt.cyl">        -- Returning 0, 0 invalidates the result        value = 0        timestamp = 0        source = 0 -      if(lensmeter and brillemaaler.odxt and brillemaaler.cyl.odxt and brillemaaler.cyl.value.odxt and brillemaaler.cyl.timestamp.odxt) +      if(lensmeter and lensmeter.odxt and lensmeter.odxt.cyl and lensmeter.odxt.cyl.value and lensmeter.odxt.cyl.timestamp) +      then +        value = lensmeter.odxt.cyl.value +        -- convert . to , +        value = string.gsub(value, '[.]', ',') +        timestamp = lensmeter.odxt.cyl.timestamp +        source = lensmeter.odxt.cyl.source +      end +      return value, timestamp, source +    </map> +    <map name="lensmeter.odxt.axis"> +      -- Returning 0, 0 invalidates the result +      value = 0 +      timestamp = 0 +      source = 0 + +      if(lensmeter and lensmeter.odxt and lensmeter.odxt.axis and lensmeter.odxt.axis.value and lensmeter.odxt.axis.timestamp)        then -        value = brillemaaler.cyl.value.odxt +        value = lensmeter.odxt.axis.value          -- convert . to ,          value = string.gsub(value, '[.]', ',') -        timestamp = brillemaaler.cyl.timestamp.odxt -        source = brillemaaler.cyl.odxt.source +        timestamp = lensmeter.odxt.axis.timestamp +        source = lensmeter.odxt.axis.source        end        return value, timestamp, source      </map> @@ -222,17 +254,17 @@  	  <frame layout="vbox">  	    <label caption="Sf:"/> -	    <lineedit name="brillemaaler.sf.odxt" map="brillemaaler.sf.odxt" +	    <lineedit name="brillemaaler.sf.odxt" map="lensmeter.odxt.sph"  		      regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>  	  </frame>  	  <frame layout="vbox">  	    <label caption="Cyl:"/> -	    <lineedit name="brillemaaler.cyl.odxt" map="brillemaaler.cyl.odxt" +	    <lineedit name="brillemaaler.cyl.odxt" map="lensmeter.odxt.cyl"  		      regexp="|[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>  	  </frame>  	  <frame layout="vbox">  	    <label caption="Grader:"/> -	    <lineedit name="brillemaaler.grader.odxt" map="brillemaaler.grader.odxt" +	    <lineedit name="brillemaaler.grader.odxt" map="lensmeter.odxt.axis"  		      regexp="|[\d]+" script="lt359gt0" value=""/>  	  </frame>  	</frame> @@ -248,17 +280,17 @@  	  <frame layout="vbox">  	    <label caption="Sf:"/> -	    <lineedit name="brillemaaler.sf.osin" map="brillemaaler.sf.osin" +	    <lineedit name="brillemaaler.sf.osin" map="lensmeter.osin.sph"  		      regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>  	  </frame>  	  <frame layout="vbox">  	    <label caption="Cyl:"/> -	    <lineedit name="brillemaaler.cyl.osin" map="brillemaaler.cyl.osin" +	    <lineedit name="brillemaaler.cyl.osin" map="lensmeter.osin.cyl"  		      regexp="|[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>  	  </frame>  	  <frame layout="vbox">  	    <label caption="Grader:"/> -	    <lineedit name="brillemaaler.grader.osin" map="brillemaaler.grader.osin" +	    <lineedit name="brillemaaler.grader.osin" map="lensmeter.osin.axis"  		      regexp="|[\d]+" script="lt359gt0" value=""/>  	  </frame>  	</frame> | 
