From fac325d423fae252f1fef7954b16ef7f0a12632b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20J=C3=A4ger?= Date: Tue, 13 Apr 2021 09:23:50 +0200 Subject: [PATCH] ThingSet: Move info/Timestamp_s to output/Uptime_s This makes clear that the timestamp is not the actual time, but the seconds since the device started. The timestamp is also not stored in NVM anymore, as the DayCount provides information about the operating time of the device already. This way it can be found out if there was a reset of the device based on its uptime. --- src/data_nodes.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/data_nodes.cpp b/src/data_nodes.cpp index 193a174..97232b2 100644 --- a/src/data_nodes.cpp +++ b/src/data_nodes.cpp @@ -85,9 +85,6 @@ static DataNode data_nodes[] = { TS_NODE_STRING(0x1D, "FirmwareVersion", firmware_version, 0, ID_INFO, TS_ANY_R, 0), - TS_NODE_UINT32(0x20, "Timestamp_s", ×tamp, - ID_INFO, TS_ANY_R | TS_ANY_W, PUB_SER | PUB_NVM), - // CONFIGURATION ////////////////////////////////////////////////////////// // using IDs >= 0x30 except for high priority data objects @@ -239,6 +236,10 @@ static DataNode data_nodes[] = { TS_NODE_PATH(ID_OUTPUT, "output", 0, NULL), + // the timestamp currently reflects the time since last reset and not an actual timestamp + TS_NODE_UINT32(0x01, "Uptime_s", ×tamp, + ID_OUTPUT, TS_ANY_R, PUB_SER), + // battery related data objects TS_NODE_FLOAT(0x71, "Bat_V", &bat_bus.voltage, 2, ID_OUTPUT, TS_ANY_R, PUB_SER | PUB_CAN),