You are reading a single comment by @Pumych and its replies. Click here to read the full conversation.
  • Playing around with REMOTE CONTROL SOCKETS .
    Wired transmitter and receiver, and its sends and receives the bits on pressing BTN but I trying to understand the whole code:
    In this function

    function sigOff(e) {
      var d = e.time-t;
      t = e.time;
      if (d>0.0001 && d<0.001)
        n = (n<<1) | ((d>=0.0004)?1:0);
      else
        n=0;
    }
    

    what is the meaning of bold code
    n = (n<<1) | ((d>=0.0004)?1:0);
    I mean what doing "<<" sign and "|" one (it's not the same as "||" in JavaScript?)

    Can you please add a link for reference for those signs in JS (or not JS)?

    EDIT:
    Found it here but still little confused to understand the sigOn() and sigOff() functions. Can someone please add step-by-step explanations for those functions or add new ones but with simple code?

About

Avatar for Pumych @Pumych started