store version as separate string

This commit is contained in:
TT 2019-08-18 21:11:03 +09:00
parent c8e1dbcbdd
commit 28614dbb4a

4
main.c
View file

@ -1667,11 +1667,13 @@ static void cmd_stat(BaseSequentialStream *chp, int argc, char *argv[])
#define VERSION "unknown" #define VERSION "unknown"
#endif #endif
const char NANOVNA_VERSION[] = VERSION;
static void cmd_version(BaseSequentialStream *chp, int argc, char *argv[]) static void cmd_version(BaseSequentialStream *chp, int argc, char *argv[])
{ {
(void)argc; (void)argc;
(void)argv; (void)argv;
chprintf(chp, VERSION "\r\n"); chprintf(chp, "%s\r\n", NANOVNA_VERSION);
} }
#define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(256) #define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(256)