|
From: <ma...@us...> - 2011-08-10 19:38:36
|
Revision: 399
http://openautomation.svn.sourceforge.net/openautomation/?rev=399&view=rev
Author: makki1
Date: 2011-08-10 19:38:27 +0000 (Wed, 10 Aug 2011)
Log Message:
-----------
Add DPT16 to transform_knx (UTF8 vs 8859-1 maybe not yet perfect but ASCII works)
Modified Paths:
--------------
CometVisu/trunk/visu/transforms/transform_knx.js
Modified: CometVisu/trunk/visu/transforms/transform_knx.js
===================================================================
--- CometVisu/trunk/visu/transforms/transform_knx.js 2011-08-09 19:07:58 UTC (rev 398)
+++ CometVisu/trunk/visu/transforms/transform_knx.js 2011-08-10 19:38:27 UTC (rev 399)
@@ -268,13 +268,47 @@
}
},
'14': {
- link : '14.001',
+ link : '16.001',
name : '4 byte float',
lname : {
'de': '4 Byte Gleitkommazahl'
},
unit : '-'
},
+ '16.001' : {
+ name : 'DPT_String_8859_1',
+ lname : {
+ 'de': '14 Byte Text ISO-8859-1'
+ },
+ decode: function( hex ){
+ console.log('16-val: ' + hex);
+ var val="";
+ var chars;
+ for (var i=0;i<28;i=i+2) {
+ chars=parseInt(hex.substr(i,2),16);
+ if (chars>0) {
+ val+=String.fromCharCode(chars);
+ }
+ }
+ return val;
+ }
+ },
+ '16.000': {
+ link : '16.001',
+ name : 'DPT_String_ASCII',
+ lname : {
+ 'de': '14 Byte Text ASCII'
+ },
+ unit : '-'
+ },
+ '16': {
+ link : '16.001',
+ name : 'DPT_String_ASCII',
+ lname : {
+ 'de': '14 Byte Text ASCII'
+ },
+ unit : '-'
+ },
'20.102': {
name : 'DPT_HVACMode',
lname : {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|