From 9b5f25ae2c5cafd83c61fa6ebf1d0d57b01a958f Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 16 Apr 2020 14:04:54 +1000 Subject: [PATCH] confserver: Always store hex values in sdkconfig with 0x prefix This is not necessary for correct behaviour or to have valid sdkconfig files (previous commit adds tests for this), but it's useful for consistency with sdkconfig files generated by menuconfig. As reported in https://github.com/espressif/vscode-esp-idf-extension/issues/83 --- tools/kconfig_new/confserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kconfig_new/confserver.py b/tools/kconfig_new/confserver.py index 536f43ed5..f8694a933 100755 --- a/tools/kconfig_new/confserver.py +++ b/tools/kconfig_new/confserver.py @@ -228,7 +228,7 @@ def handle_set(config, error, to_set): try: if not isinstance(val, int): val = int(val, 16) # input can be a decimal JSON value or a string of hex digits - sym.set_value("%x" % val) + sym.set_value(hex(val)) except ValueError: error.append("Hex symbol %s can accept a decimal integer or a string of hex digits, only") else: