Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pio-scripts/set_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
with open(PACKAGE_FILE, "r") as package:
version = json.load(package)["version"]
env.Append(BUILD_FLAGS=[f"-DWLED_VERSION={version}"])
if "-b" in version:
env.Append(BUILD_FLAGS=[f"-DWLED_BRANCH=beta"])
else:
env.Append(BUILD_FLAGS=[f"-DWLED_BRANCH=stable"])
2 changes: 2 additions & 0 deletions usermods/smartnest/usermod_smartnest.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ class Smartnest : public Usermod
delay(100);
sendToBroker("report/firmware", versionString); // Reports the firmware version
delay(100);
sendToBroker("report/branch", branchString); // Reports the firmware branch
delay(100);
sendToBroker("report/ip", (char *)WiFi.localIP().toString().c_str()); // Reports the ip
delay(100);
sendToBroker("report/network", (char *)WiFi.SSID().c_str()); // Reports the network name
Expand Down
1 change: 1 addition & 0 deletions wled00/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ void serializeInfo(JsonObject root)
{
root[F("ver")] = versionString;
root[F("vid")] = VERSION;
root[F("branch")] = branchString;
//root[F("cn")] = WLED_CODENAME;

JsonObject leds = root.createNestedObject("leds");
Expand Down
2 changes: 2 additions & 0 deletions wled00/wled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ void WLED::setup()
DEBUG_PRINT(versionString);
DEBUG_PRINT(" ");
DEBUG_PRINT(VERSION);
DEBUG_PRINT(" ");
DEBUG_PRINT(branchString);
DEBUG_PRINTLN(F(" INIT---"));
#ifdef ARDUINO_ARCH_ESP32
DEBUG_PRINT(F("esp32 "));
Expand Down
5 changes: 5 additions & 0 deletions wled00/wled.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,13 @@ using PSRAMDynamicJsonDocument = BasicJsonDocument<PSRAM_Allocator>;
#define WLED_VERSION "dev"
#endif

#ifndef WLED_BRANCH
#define WLED_BRANCH "dev"
#endif

// Global Variable definitions
WLED_GLOBAL char versionString[] _INIT(TOSTRING(WLED_VERSION));
WLED_GLOBAL char branchString[] _INIT(TOSTRING(WLED_BRANCH));
#define WLED_CODENAME "Hoshi"

// AP and OTA default passwords (for maximum security change them!)
Expand Down