Jump to content
C4 Forums | Control4

rakeshcea

c4Forums Member
  • Posts

    9
  • Joined

  • Last visited

Posts posted by rakeshcea

  1. I am developing a driver for assa abloy access control system. Have 17 doors to be opened from control 4. So like to have the option to list 17 doors with lock/unlock icon as well as a button to refresh cookies and token. Currently this is done in Crestron and Control4 send commands to Crestron. I like to move everything to c4. 

  2. What will be the equivalent code in lua to calculate checksum written in C

        tempString = rx$;
        checksum = 255;
        for (i = 1 to len(tempString))
        {
            checksum = checksum ^ byte(tempString, i);
        }
        tx$ = tempString + chr(checksum);
        clearbuffer (rx$);

     

    I tried to changed in lua and build with notepad++. Its working in notepad++ but not in Composer pro. I believe ~ is no longer supported for xor operation.

    function check()
        local tempString = "ECSA1*1"
        local checksum = 255
        local tx
        for i = 1 , string.len(tempString) do
            
            checksum = checksum ~ string.byte(tempString, i)
     
        end    
         tx=string.format("Checksum = %s%x",tempString,checksum)     
     
    end

     

     

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.