Restructuring to be able to include precompiled kmp lib

This commit is contained in:
Gunnar Skjold
2024-07-11 13:15:22 +02:00
parent 4407526d96
commit 8a4efd0047
32 changed files with 105 additions and 25 deletions

View File

@@ -382,6 +382,15 @@ void AmsWebServer::sysinfoJson() {
meterId.replace(F("\\"), F("\\\\"));
time_t now = time(nullptr);
String features = "";
#if defined(AMS_REMOTE_DEBUG)
if(!features.isEmpty()) features += ",";
features += "\"rdebug\"";
#endif
#if defined(AMS_KMP)
if(!features.isEmpty()) features += ",";
features += "\"kmp\"";
#endif
int size = snprintf_P(buf, BufferSize, SYSINFO_JSON,
FirmwareVersion::VersionString,
@@ -465,7 +474,8 @@ void AmsWebServer::sysinfoJson() {
ea->getCostLastMonth(),
ea->getProducedLastMonth(),
ea->getIncomeLastMonth(),
tz == NULL ? 0 : (tz->toLocal(now)-now)/3600
tz == NULL ? 0 : (tz->toLocal(now)-now)/3600,
features.c_str()
);
stripNonAscii((uint8_t*) buf, size+1);