Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: JavaScript spacings

...

Code Block
function Encode(fPort, obj) 
{
    var encoded = [];

    if ("Valve_Position" in obj) 
    {
        var new_vp = obj.Valve_Position;
        encoded = [new_vp,0x00,0x28,0x00,0x30,0x40];

   }

    if ("Set_Point_Ambient_Temperature" in obj)     {
   
    var new_spt = (obj.Set_Point_Ambient_Temperature)*2;
        encoded = [new_spt,0x00,0x28,0x08,0x30,0x40];
    }



  return encoded;
}

...