mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-13 13:09:49 +04:00
New way of changing device name
Settings scene, char Validator, Idea -> by Willy-JL Implemented by me Kod plohoi, ochen plohoi, kto mozhet - sdelaite kak nado, esli smozhete :) Ya luche varianta ne pridumal poka 4to
This commit is contained in:
@@ -24,18 +24,14 @@ struct Version {
|
||||
};
|
||||
|
||||
/* version of current running firmware (bootloader/flipper) */
|
||||
static const Version version = {
|
||||
static Version version = {
|
||||
.magic = VERSION_MAGIC,
|
||||
.major = VERSION_MAJOR,
|
||||
.minor = VERSION_MINOR,
|
||||
.git_hash = GIT_COMMIT,
|
||||
.git_branch = GIT_BRANCH,
|
||||
.build_date = BUILD_DATE,
|
||||
#ifdef FURI_CUSTOM_FLIPPER_NAME
|
||||
.custom_flipper_name = FURI_CUSTOM_FLIPPER_NAME,
|
||||
#else
|
||||
.custom_flipper_name = NULL,
|
||||
#endif
|
||||
.version = VERSION
|
||||
#ifdef FURI_RAM_EXEC
|
||||
" (RAM)"
|
||||
@@ -74,6 +70,12 @@ const char* version_get_custom_name(const Version* v) {
|
||||
return v ? v->custom_flipper_name : version.custom_flipper_name;
|
||||
}
|
||||
|
||||
void version_set_custom_name(Version* v, const char* name) {
|
||||
Version* ver = v ? v : &version;
|
||||
ver->custom_flipper_name = name;
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t version_get_target(const Version* v) {
|
||||
return v ? v->target : version.target;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user