lib/openc3/utilities/crc.rb in openc3-5.18.0 vs lib/openc3/utilities/crc.rb in openc3-5.19.0
- old
+ new
@@ -43,13 +43,13 @@
0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,
0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF
]
- # @return [Integer] The polynomial used when calcuating the CRC
+ # @return [Integer] The polynomial used when calculating the CRC
attr_reader :poly
- # @return [Integer] Seed value used to start the calulation
+ # @return [Integer] Seed value used to start the calculation
attr_reader :seed
# @return [Boolean] Whether the result is XORed with 0xFFFF
attr_reader :xor
# @return [Boolean] Whether to bit reverse each byte
attr_reader :reflect
@@ -219,11 +219,11 @@
# CRC-8-DVB-S2 default polynomial
DEFAULT_POLY = 0xD5
# Seed for 8-bit CRC
DEFAULT_SEED = 0x00
- # Creates a 8 bit CRC algorithm instance. By default it is initialzed to
+ # Creates a 8 bit CRC algorithm instance. By default it is initialized to
# use the CRC-8-DVB-S2 algorithm.
#
# @param poly [Integer] Polynomial to use when calculating the CRC
# @param seed [Integer] Seed value to start the calculation
# @param xor [Boolean] Whether to XOR the CRC result with 0xFF
@@ -244,11 +244,11 @@
# CRC-16-CCITT default polynomial
DEFAULT_POLY = 0x1021
# Seed for 16-bit CRC
DEFAULT_SEED = 0xFFFF
- # Creates a 16 bit CRC algorithm instance. By default it is initialzed to
+ # Creates a 16 bit CRC algorithm instance. By default it is initialized to
# use the CRC-16-CCITT algorithm.
#
# @param poly [Integer] Polynomial to use when calculating the CRC
# @param seed [Integer] Seed value to start the calculation
# @param xor [Boolean] Whether to XOR the CRC result with 0xFFFF
@@ -269,11 +269,11 @@
# CRC-32 default polynomial
DEFAULT_POLY = 0x04C11DB7
# Default Seed for 32-bit CRC
DEFAULT_SEED = 0xFFFFFFFF
- # Creates a 32 bit CRC algorithm instance. By default it is initialzed to
+ # Creates a 32 bit CRC algorithm instance. By default it is initialized to
# use the CRC-32 algorithm.
#
# @param poly [Integer] Polynomial to use when calculating the CRC
# @param seed [Integer] Seed value to start the calculation
# @param xor [Boolean] Whether to XOR the CRC result with 0xFFFF
@@ -294,10 +294,10 @@
# CRC-64-ECMA default polynomial
DEFAULT_POLY = 0x42F0E1EBA9EA3693
# Default Seed for 64-bit CRC
DEFAULT_SEED = 0xFFFFFFFFFFFFFFFF
- # Creates a 64 bit CRC algorithm instance. By default it is initialzed to
+ # Creates a 64 bit CRC algorithm instance. By default it is initialized to
# use the algorithm.
#
# @param poly [Integer] Polynomial to use when calculating the CRC
# @param seed [Integer] Seed value to start the calculation
# @param xor [Boolean] Whether to XOR the CRC result with 0xFFFF