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.
This commit is contained in:
+4
-3
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user