* Semantic versioning in repeater, room server. "ver" CLI command changed.

This commit is contained in:
Scott Powell
2025-03-03 13:22:49 +11:00
parent 45365322a7
commit ad5f588028
4 changed files with 20 additions and 5 deletions

View File

@@ -21,7 +21,13 @@
/* ------------------------------ Config -------------------------------- */
#define FIRMWARE_VER_TEXT "v6 (build: 27 Feb 2025)"
#ifndef FIRMWARE_BUILD_DATE
#define FIRMWARE_BUILD_DATE "3 Mar 2025"
#endif
#ifndef FIRMWARE_VERSION
#define FIRMWARE_VERSION "v1.0.0"
#endif
#ifndef LORA_FREQ
#define LORA_FREQ 915.0
@@ -516,7 +522,8 @@ public:
updateAdvertTimer();
}
const char* getFirmwareVer() override { return FIRMWARE_VER_TEXT; }
const char* getFirmwareVer() override { return FIRMWARE_VERSION; }
const char* getBuildDate() override { return FIRMWARE_BUILD_DATE; }
void savePrefs() override {
#if defined(NRF52_PLATFORM)

View File

@@ -21,7 +21,13 @@
/* ------------------------------ Config -------------------------------- */
#define FIRMWARE_VER_TEXT "v6 (build: 27 Feb 2025)"
#ifndef FIRMWARE_BUILD_DATE
#define FIRMWARE_BUILD_DATE "3 Mar 2025"
#endif
#ifndef FIRMWARE_VERSION
#define FIRMWARE_VERSION "v1.0.0"
#endif
#ifndef LORA_FREQ
#define LORA_FREQ 915.0
@@ -551,7 +557,8 @@ public:
updateAdvertTimer();
}
const char* getFirmwareVer() override { return FIRMWARE_VER_TEXT; }
const char* getFirmwareVer() override { return FIRMWARE_VERSION; }
const char* getBuildDate() override { return FIRMWARE_BUILD_DATE; }
void savePrefs() override {
#if defined(NRF52_PLATFORM)

View File

@@ -204,7 +204,7 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
bool s = _callbacks->formatFileSystem();
sprintf(reply, "File system erase: %s", s ? "OK" : "Err");
} else if (memcmp(command, "ver", 3) == 0) {
strcpy(reply, _callbacks->getFirmwareVer());
sprintf(reply, "%s (Build: %s)", _callbacks->getFirmwareVer(), _callbacks->getBuildDate());
} else if (memcmp(command, "log start", 9) == 0) {
_callbacks->setLoggingOn(true);
strcpy(reply, " logging on");

View File

@@ -28,6 +28,7 @@ class CommonCLICallbacks {
public:
virtual void savePrefs() = 0;
virtual const char* getFirmwareVer() = 0;
virtual const char* getBuildDate() = 0;
virtual bool formatFileSystem() = 0;
virtual void sendSelfAdvertisement(int delay_millis) = 0;
virtual void updateAdvertTimer() = 0;