mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-27 12:43:08 +00:00
Move version constants into its own compile-unit
Speeds up the build by moving those constants into a separate compile-unit. Currently, since the version header is auto regenerated on each build, all modules that include it, also have to be recompiled every time.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "HomeAssistantMqttHandler.h"
|
||||
#include "hexutils.h"
|
||||
#include "Uptime.h"
|
||||
#include "version.h"
|
||||
#include "FirmwareVersion.h"
|
||||
#include "json/ha1_json.h"
|
||||
#include "json/ha2_json.h"
|
||||
#include "json/ha3_json.h"
|
||||
@@ -329,7 +329,7 @@ bool HomeAssistantMqttHandler::publishSystem(HwTools* hw, EntsoeApi* eapi, Energ
|
||||
hw->getVcc(),
|
||||
hw->getWifiRssi(),
|
||||
hw->getTemperature(),
|
||||
VERSION
|
||||
FirmwareVersion::VersionString
|
||||
);
|
||||
bool ret = mqtt->publish(topic + "/state", json);
|
||||
loop();
|
||||
@@ -353,7 +353,7 @@ void HomeAssistantMqttHandler::publishSensor(const HomeAssistantSensor& sensor)
|
||||
deviceUid.c_str(),
|
||||
deviceName.c_str(),
|
||||
deviceModel.c_str(),
|
||||
VERSION,
|
||||
FirmwareVersion::VersionString,
|
||||
manufacturer.c_str(),
|
||||
deviceUrl.c_str(),
|
||||
strlen_P(sensor.devcl) > 0 ? ",\"dev_cla\":\"" : "",
|
||||
|
||||
Reference in New Issue
Block a user