Ignore:
Timestamp:
Jan 14, 2011, 3:30:29 PM (9 years ago)
Author:
mulligan
Message:

Checksum seems to be working now on most lines, barring three? Weird bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D4.1/IntelHex.ml

    r446 r447  
    213213
    214214let calculate_data_checksum (record_length, record_addr, record_type, data_field) =
    215  let ty = (flip vect_of_int $ `Eight) $ int_of_intel_hex_entry_type record_type in
    216  let addr1,addr2 = from_word record_addr in
    217  let _, total = add_bytes (record_length :: addr1 :: addr2 :: ty :: data_field) in
    218  let _,total = half_add (vect_of_int 1 `Eight) $ complement total in
    219    total
     215  let ty = (flip vect_of_int $ `Eight) $ int_of_intel_hex_entry_type record_type in
     216  let addr1,addr2 = from_word record_addr in
     217  let _, total = add_bytes (record_length :: addr1 :: addr2 :: ty :: data_field) in
     218  let _,total = half_add (vect_of_int 1 `Eight) $ complement total in
     219    total
    220220;;
    221221
Note: See TracChangeset for help on using the changeset viewer.