Browse Source

Patch up version encoding

zvecr 4 years ago
parent
commit
f4f2002ed8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/python/qmk/xap/gen_firmware/header_generator.py

+ 2 - 2
lib/python/qmk/xap/gen_firmware/header_generator.py

@@ -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('')