mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-12-03 08:25:11 +00:00
Patch up version encoding
This commit is contained in:
parent
819bf2eff8
commit
f4f2002ed8
@ -244,9 +244,9 @@ def generate_header(output_file, keyboard, keymap):
|
||||
# Versions
|
||||
prog = re.compile(r'^(\d+)\.(\d+)\.(\d+)')
|
||||
b = prog.match(xap_defs['version'])
|
||||
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)):02X}{int(b.group(2)):02X}{int(b.group(3)):04X}ul')
|
||||
b = prog.findall(git_get_version() or "") or [('0', '0', '0')]
|
||||
lines.append(f'#define QMK_BCD_VERSION 0x{int(b[0][0]):02d}{int(b[0][1]):02d}{int(b[0][1]):04d}ul')
|
||||
lines.append(f'#define QMK_BCD_VERSION 0x{int(b[0][0]):02X}{int(b[0][1]):02X}{int(b[0][2]):04X}ul')
|
||||
keyboard_id = fnv1a_32(bytes(keyboard, 'utf-8'))
|
||||
lines.append(f'#define XAP_KEYBOARD_IDENTIFIER 0x{keyboard_id:08X}ul')
|
||||
lines.append('')
|
||||
|
Loading…
Reference in New Issue
Block a user