Skip to content

Conversation

spuder
Copy link
Contributor

@spuder spuder commented Sep 11, 2017

Shows the MSP api version in the cli under version. In this case 1.36

# version
# Betaflight / SPRACINGF3 (SRF3) 3.2.0 Sep 10 2017 / 21:24:44 (a8ad6f645) 1.36

@spuder spuder changed the title [WIP] Sets api version Show MSP version in cli Sep 11, 2017
@spuder spuder changed the title Show MSP version in cli Show MSP API version in cli Sep 11, 2017
@@ -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)
Copy link
Member

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.

Copy link
Contributor Author

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?

@@ -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",
Copy link
Member

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.

Copy link
Contributor Author

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

@martinbudden martinbudden merged commit 649ccd7 into betaflight:master Sep 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants