Skip to content

Commit c9df214

Browse files
committed
kconfig: use buildin function to get app version
1 parent b09517d commit c9df214

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

main/Kconfig.projbuild

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,4 @@ config ENABLE_AUDIO_PROMPT
276276
Select this to enable Audio Prompt.
277277
endmenu
278278

279-
config FIRMWARE_VERSION
280-
string "Firmware Version"
281-
default "v3.2.1"
282-
help
283-
Set Firmware Version.
284-
285279
endmenu

main/src/os/firmware.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
#include <string.h>
99

1010
#include "esp_log.h"
11+
#include "esp_ota_ops.h"
1112

1213
#define TAG "os_firmware"
1314

14-
const char *version = CONFIG_FIRMWARE_VERSION;
15-
1615
const char *os_firmware_get_version(void)
1716
{
18-
return version;
17+
const esp_app_desc_t *app_desc = esp_ota_get_app_description();
18+
19+
return (const char *)app_desc->version;
1920
}

0 commit comments

Comments
 (0)