mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-27 01:58:09 -07:00
Merge branch 'fz-dev' into dev
This commit is contained in:
+16
-4
@@ -1,24 +1,35 @@
|
||||
#include "version.h"
|
||||
|
||||
#include <furi.h>
|
||||
/* This header is autogenerated by build system */
|
||||
#include "version.inc.h"
|
||||
|
||||
#define VERSION_MAGIC (0xBE40u)
|
||||
#define VERSION_MAJOR (0x1u)
|
||||
#define VERSION_MINOR (0x0u)
|
||||
|
||||
struct Version {
|
||||
// Header
|
||||
const uint16_t magic;
|
||||
const uint8_t major;
|
||||
const uint8_t minor;
|
||||
// Payload
|
||||
const char* git_hash;
|
||||
const char* git_branch;
|
||||
const char* git_branch_num;
|
||||
const char* build_date;
|
||||
const char* custom_flipper_name;
|
||||
const char* version;
|
||||
// Payload bits and pieces
|
||||
const uint8_t target;
|
||||
const bool build_is_dirty;
|
||||
};
|
||||
|
||||
/* version of current running firmware (bootloader/flipper) */
|
||||
static const Version version = {
|
||||
.magic = VERSION_MAGIC,
|
||||
.major = VERSION_MAJOR,
|
||||
.minor = VERSION_MINOR,
|
||||
.git_hash = GIT_COMMIT,
|
||||
.git_branch = GIT_BRANCH,
|
||||
.git_branch_num = GIT_BRANCH_NUM,
|
||||
.build_date = BUILD_DATE,
|
||||
#ifdef FURI_CUSTOM_FLIPPER_NAME
|
||||
.custom_flipper_name = FURI_CUSTOM_FLIPPER_NAME,
|
||||
@@ -47,7 +58,8 @@ const char* version_get_gitbranch(const Version* v) {
|
||||
}
|
||||
|
||||
const char* version_get_gitbranchnum(const Version* v) {
|
||||
return v ? v->git_branch_num : version.git_branch_num;
|
||||
UNUSED(v);
|
||||
return "0";
|
||||
}
|
||||
|
||||
const char* version_get_builddate(const Version* v) {
|
||||
|
||||
Reference in New Issue
Block a user