-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Show MSP API version in cli #4124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -36,3 +36,5 @@ extern const char* const buildDate; // "MMM DD YYYY" MMM = Jan/Feb/... | |||
|
|||
#define BUILD_TIME_LENGTH 8 | |||
extern const char* const buildTime; // "HH:MM:SS" | |||
|
|||
#define MSP_API_VERSION_STRING STR(API_VERSION_MAJOR) "." STR(API_VERSION_MINOR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add something like MSP API:
to the string to make it explicit what the number is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate? API_VERSION_MAJOR
and API_VERSION_MINOR
are already defined in msp/msp_protocol.h
. This is just referencing those variables. Should I rename those variables everywhere?
src/main/fc/cli.c
Outdated
@@ -3079,14 +3081,15 @@ static void cliVersion(char *cmdline) | |||
{ | |||
UNUSED(cmdline); | |||
|
|||
cliPrintLinef("# %s / %s (%s) %s %s / %s (%s)", | |||
cliPrintLinef("# %s / %s (%s) %s %s / %s (%s) %s", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I attached my previous comment to the wrong line, it should really have gone here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, rebased and squashed. It now looks like:
# version
# Betaflight / SPRACINGF3 (SRF3) 3.2.0 Sep 10 2017 / 22:09:06 (c73ad66b0) MSP API: 1.36
Shows the MSP api version in the cli under
version
. In this case1.36