svghmi/svghmi.js
branchsvghmi
changeset 3145 80ebb88cf7b7
parent 3142 2637bb6a6bb0
child 3148 b8c0dfdf364b
equal deleted inserted replaced
3143:8388e6d4aa61 3145:80ebb88cf7b7
   140 
   140 
   141 const typedarray_types = {
   141 const typedarray_types = {
   142     INT: (number) => new Int16Array([number]),
   142     INT: (number) => new Int16Array([number]),
   143     BOOL: (truth) => new Int16Array([truth]),
   143     BOOL: (truth) => new Int16Array([truth]),
   144     NODE: (truth) => new Int16Array([truth]),
   144     NODE: (truth) => new Int16Array([truth]),
       
   145     REAL: (number) => new Float32Array([number]),
   145     STRING: (str) => {
   146     STRING: (str) => {
   146         // beremiz default string max size is 128
   147         // beremiz default string max size is 128
   147         str = str.slice(0,128);
   148         str = str.slice(0,128);
   148         binary = new Uint8Array(str.length + 1);
   149         binary = new Uint8Array(str.length + 1);
   149         binary[0] = str.length;
   150         binary[0] = str.length;