Skip to content

Commit

Permalink
Merge pull request #4124 from spuder/api-version
Browse files Browse the repository at this point in the history
Show MSP API version in cli
  • Loading branch information
martinbudden committed Sep 11, 2017
2 parents aae4d14 + 992403d commit 649ccd7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/main/build/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
7 changes: 5 additions & 2 deletions src/main/fc/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ extern uint8_t __config_end;
#include "io/vtx_rtc6705.h"
#include "io/vtx_control.h"

#include "msp/msp_protocol.h"

#include "rx/rx.h"
#include "rx/spektrum.h"
#include "rx/frsky_d.h"
Expand Down Expand Up @@ -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) MSP API: %s",
FC_FIRMWARE_NAME,
targetName,
systemConfig()->boardIdentifier,
FC_VERSION_STRING,
buildDate,
buildTime,
shortGitRevision
shortGitRevision,
MSP_API_VERSION_STRING
);
}

Expand Down

0 comments on commit 649ccd7

Please sign in to comment.