def crc8_sae_j1850_zero(data):
    crc = 0x00
    polynomial = 0x1D

    for byte in data:
        crc ^= byte
        for _ in range(8):
            if crc & 0x80:
                crc = (crc << 1) ^ polynomial
            else:
                crc <<= 1
        crc &= 0xFF  # Ensure 8-bit CRC

    return crc

# Example usage with your provided data:
data = [0xF2, 0x00, 0x01, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
calculated_crc = crc8_sae_j1850_zero(data)
print(hex(calculated_crc))  # Output the calculated CRC in hexadecimal format


