|
From: <ma...@us...> - 2010-12-26 21:30:44
|
Revision: 227
http://openautomation.svn.sourceforge.net/openautomation/?rev=227&view=rev
Author: mayerch
Date: 2010-12-26 21:30:38 +0000 (Sun, 26 Dec 2010)
Log Message:
-----------
The transformations might contain a unit (optional!) and a "long name" (optional, locale specific).
The links in the transformations might als contain their own name (if not set, it will be inherited, just like the coding funtions)
Note: JavaScript doesn't specify if the functions are copied by value or by reference - it's doing something inbetween. If unmodified they are copied by reference which is broken up in the moment that one is modified (so it's actually a sort of lazy write by value...)
Anyway: this makes sure that no unnecessary memory is wasted...
Modified Paths:
--------------
CometVisu/trunk/visu/transforms/transform_default.js
CometVisu/trunk/visu/transforms/transform_knx.js
Modified: CometVisu/trunk/visu/transforms/transform_default.js
===================================================================
--- CometVisu/trunk/visu/transforms/transform_default.js 2010-12-23 22:54:57 UTC (rev 226)
+++ CometVisu/trunk/visu/transforms/transform_default.js 2010-12-26 21:30:38 UTC (rev 227)
@@ -61,17 +61,9 @@
{
if( transforms[trans].link )
{
- Transform[ prefix + ':' + trans ] = transforms[ transforms[trans].link ];
+ Transform[ prefix + ':' + trans ] = $.extend( {}, transforms[ transforms[trans].link ], transforms[trans] );
} else {
Transform[ prefix + ':' + trans ] = transforms[ trans ];
}
}
-}
-
-/**
- * The universal decoding function.
- */
-function decode( raw, type )
-{
- return decodeDPT( raw, type.substr(4) ); // filter away the 'DPT:'
-}
+}
\ No newline at end of file
Modified: CometVisu/trunk/visu/transforms/transform_knx.js
===================================================================
--- CometVisu/trunk/visu/transforms/transform_knx.js 2010-12-23 22:54:57 UTC (rev 226)
+++ CometVisu/trunk/visu/transforms/transform_knx.js 2010-12-26 21:30:38 UTC (rev 227)
@@ -181,6 +181,14 @@
return sign * Math.pow( 2, exp ) * ( mant / (1 << 23));
}
},
+ '14': {
+ link : '14.001',
+ name : '4 byte float',
+ lname : {
+ 'de': '4 Byte Gleitkommazahl'
+ },
+ unit : '-'
+ },
/* 9 Zeilen:
},
'.001' : {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|