Merge branch 'add/mfg_tool_manualcode_format_v1.0' into 'release/v1.0'

mfg_tool: add manualcode format(backport v1.0)

See merge request app-frameworks/esp-matter!376
This commit is contained in:
Hrishikesh Dhayagude
2023-05-16 17:27:13 +08:00
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -391,7 +391,7 @@ def organize_output_files(suffix, args):
def generate_summary(args):
master_csv = os.sep.join([OUT_DIR['stage'], 'master.csv'])
summary_csv = os.sep.join([OUT_DIR['top'], 'summary-{}.csv'.format(datetime.now().strftime("%Y-%m-%d-%H:%M:%S"))])
summary_csv = os.sep.join([OUT_DIR['top'], 'summary-{}.csv'.format(datetime.now().strftime("%Y-%m-%d-%H-%M-%S"))])
summary_csv_data = ''
with open(master_csv, 'r') as mcsvf:
+2
View File
@@ -333,4 +333,6 @@ def get_chip_manualcode(chip_tool, vid, pid, flow, discriminator, passcode):
# TODO: change the format of 21-digits maunal code
if manual_code_len == SHORT_MANUALCODE_LEN:
ret = ret[:4] + '-' + ret[4:7] + '-' + ret[7:]
elif manual_code_len == LONG_MANUALCODE_LEN:
ret = '"' + ret[:4] + '-' + ret[4:7] + '-' + ret[7:11] + '\n' + ret[11:15] + '-' + ret[15:18] + '-' + ret[18:20] + '-' + ret[20:21] + '"'
return ret