Swap to fnvhash due to deps.

This commit is contained in:
Nick Brassel 2021-09-15 08:45:14 +10:00
parent eba91c6e28
commit 437559cd03
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
"""This script generates the XAP protocol generated header to be compiled into QMK. """This script generates the XAP protocol generated header to be compiled into QMK.
""" """
import re import re
import pyhash from fnvhash import fnv1a_32
from qmk.commands import get_git_version from qmk.commands import get_git_version
from qmk.constants import GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE from qmk.constants import GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE
@ -107,7 +107,7 @@ def generate_header(output_file, keyboard):
lines.append(f'#define XAP_BCD_VERSION 0x{int(b.group(1)):02d}{int(b.group(2)):02d}{int(b.group(3)):04d}ul') lines.append(f'#define XAP_BCD_VERSION 0x{int(b.group(1)):02d}{int(b.group(2)):02d}{int(b.group(3)):04d}ul')
b = prog.match(get_git_version()) b = prog.match(get_git_version())
lines.append(f'#define QMK_BCD_VERSION 0x{int(b.group(1)):02d}{int(b.group(2)):02d}{int(b.group(3)):04d}ul') lines.append(f'#define QMK_BCD_VERSION 0x{int(b.group(1)):02d}{int(b.group(2)):02d}{int(b.group(3)):04d}ul')
keyboard_id = pyhash.murmur3_32()(keyboard) keyboard_id = fnv1a_32(keyboard)
lines.append(f'#define XAP_KEYBOARD_IDENTIFIER 0x{keyboard_id:08X}ul') lines.append(f'#define XAP_KEYBOARD_IDENTIFIER 0x{keyboard_id:08X}ul')
lines.append('') lines.append('')

View File

@ -2,11 +2,11 @@
appdirs appdirs
argcomplete argcomplete
colorama colorama
fnvhash
hid hid
hjson hjson
jsonschema>=3 jsonschema>=3
milc>=1.4.2 milc>=1.4.2
pygments pygments
pyhash
pyusb pyusb
qmk-dotty-dict qmk-dotty-dict