diff options
| author | JF <jf@codingfield.com> | 2020-09-02 19:31:31 (GMT) |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-09-02 19:31:31 (GMT) |
| commit | 1aa5b0a440de3015b5b4c88aa32d149a69bfa707 (patch) | |
| tree | 28e6735e6bce40c59bd237e250113ac687494c2b /src/Version.h.in | |
| parent | 61e7ad9186831269f8ea9478c75dd6a57e474638 (diff) | |
Fix firmware version reported by Device Information Service on BLE. It was previously hard-coded, it is now set by CMake accoridng to the project version.
Fix Manufacturer name, model number, sw revision according to https://wiki.pine64.org/index.php?title=Firmware_versioning_for_companion_apps.
Diffstat (limited to 'src/Version.h.in')
| -rw-r--r-- | src/Version.h.in | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Version.h.in b/src/Version.h.in index c68a03c..dce83c8 100644 --- a/src/Version.h.in +++ b/src/Version.h.in @@ -5,12 +5,14 @@ namespace Pinetime { class Version { public: - static uint32_t Major() {return major;} - static uint32_t Minor() {return minor;} - static uint32_t Patch() {return patch;} + static constexpr uint32_t Major() {return major;} + static constexpr uint32_t Minor() {return minor;} + static constexpr uint32_t Patch() {return patch;} + static constexpr char* VersionString() {return versionString;} private: static constexpr uint32_t major = @PROJECT_VERSION_MAJOR@; static constexpr uint32_t minor = @PROJECT_VERSION_MINOR@; static constexpr uint32_t patch = @PROJECT_VERSION_PATCH@; + static constexpr char* versionString = "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@"; }; }
\ No newline at end of file |
