Polynomial:= 4129
CRC:=0;
for Loop:=1 to Length(s) do
begin
Temp:=s[Loop];
CRC:= CRC xor (integer(Temp) *256);
CRC:= CRC mod 65536;
for i:=7 downto 0 do
begin
if ( (CRC and 32768)=32768) then
begin
CRC:= CRC *2 ;
CRC:= CRC xor Polynomial;
end
else
begin
CRC:= CRC *2 ;
end;
CRC:=CRC mod 65536;
end;
end;
result:=CRC;
https://en.racelogic.support//Product_Info/VBOX_Data_Loggers/VBOX_Sigma/VBOX_Sigma_User_Guide/07_-
_VBOX_Sigma_Technical_Properties/VBOX_Sigma_-_RS232_Output_Format
44