diff --git a/proto b/proto index 99ce57802..31eaff092 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 99ce57802da9e8a3106d29b94e14e4a090cde3b3 +Subproject commit 31eaff092449a75ebbbf0114cf120c746dc96349 diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 64ac00673..a394db13e 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -506,8 +506,8 @@ void NodeDB::updateTelemetry(uint32_t nodeId, const Telemetry &t, RxSource src) } else { DEBUG_MSG("updateTelemetry REMOTE node=0x%x \n", nodeId); } - info->telemetry = t; - info->has_telemetry = true; + info->device_metrics = t.variant.device_metrics; + info->has_device_metrics = true; updateGUIforNode = info; notifyObservers(true); // Force an update whether or not our node counts have changed } diff --git a/src/mesh/generated/deviceonly.pb.h b/src/mesh/generated/deviceonly.pb.h index 0dc8daa33..8250cf568 100644 --- a/src/mesh/generated/deviceonly.pb.h +++ b/src/mesh/generated/deviceonly.pb.h @@ -108,7 +108,7 @@ extern const pb_msgdesc_t ChannelFile_msg; /* Maximum encoded size of messages (where known) */ #define ChannelFile_size 832 -#define DeviceState_size 25183 +#define DeviceState_size 23903 #ifdef __cplusplus } /* extern "C" */ diff --git a/src/mesh/generated/mesh.pb.h b/src/mesh/generated/mesh.pb.h index aef07ed15..eadcfa32a 100644 --- a/src/mesh/generated/mesh.pb.h +++ b/src/mesh/generated/mesh.pb.h @@ -562,9 +562,9 @@ typedef struct _NodeInfo { float snr; /* Set to indicate the last time we received a packet from this node */ uint32_t last_heard; - /* The latest device telemetry data for the node. */ - bool has_telemetry; - Telemetry telemetry; + /* The latest device metrics for the node. */ + bool has_device_metrics; + DeviceMetrics device_metrics; } NodeInfo; /* A Routing control Data packet handled by the routing module */ @@ -737,7 +737,7 @@ extern "C" { #define Data_init_default {_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, Location_init_default} #define Location_init_default {0, 0, 0, 0, 0} #define MeshPacket_init_default {0, 0, 0, 0, {Data_init_default}, 0, 0, 0, 0, 0, _MeshPacket_Priority_MIN, 0, _MeshPacket_Delayed_MIN} -#define NodeInfo_init_default {0, false, User_init_default, false, Position_init_default, 0, 0, false, Telemetry_init_default} +#define NodeInfo_init_default {0, false, User_init_default, false, Position_init_default, 0, 0, false, DeviceMetrics_init_default} #define MyNodeInfo_init_default {0, 0, "", "", _CriticalErrorCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, 0, 0} #define LogRecord_init_default {"", 0, "", _LogRecord_Level_MIN} #define FromRadio_init_default {0, 0, {MyNodeInfo_init_default}} @@ -750,7 +750,7 @@ extern "C" { #define Data_init_zero {_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, Location_init_zero} #define Location_init_zero {0, 0, 0, 0, 0} #define MeshPacket_init_zero {0, 0, 0, 0, {Data_init_zero}, 0, 0, 0, 0, 0, _MeshPacket_Priority_MIN, 0, _MeshPacket_Delayed_MIN} -#define NodeInfo_init_zero {0, false, User_init_zero, false, Position_init_zero, 0, 0, false, Telemetry_init_zero} +#define NodeInfo_init_zero {0, false, User_init_zero, false, Position_init_zero, 0, 0, false, DeviceMetrics_init_zero} #define MyNodeInfo_init_zero {0, 0, "", "", _CriticalErrorCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, 0, 0} #define LogRecord_init_zero {"", 0, "", _LogRecord_Level_MIN} #define FromRadio_init_zero {0, 0, {MyNodeInfo_init_zero}} @@ -833,7 +833,7 @@ extern "C" { #define NodeInfo_position_tag 3 #define NodeInfo_snr_tag 4 #define NodeInfo_last_heard_tag 5 -#define NodeInfo_telemetry_tag 6 +#define NodeInfo_device_metrics_tag 6 #define Routing_route_request_tag 1 #define Routing_route_reply_tag 2 #define Routing_error_reason_tag 3 @@ -964,12 +964,12 @@ X(a, STATIC, OPTIONAL, MESSAGE, user, 2) \ X(a, STATIC, OPTIONAL, MESSAGE, position, 3) \ X(a, STATIC, SINGULAR, FLOAT, snr, 4) \ X(a, STATIC, SINGULAR, FIXED32, last_heard, 5) \ -X(a, STATIC, OPTIONAL, MESSAGE, telemetry, 6) +X(a, STATIC, OPTIONAL, MESSAGE, device_metrics, 6) #define NodeInfo_CALLBACK NULL #define NodeInfo_DEFAULT NULL #define NodeInfo_user_MSGTYPE User #define NodeInfo_position_MSGTYPE Position -#define NodeInfo_telemetry_MSGTYPE Telemetry +#define NodeInfo_device_metrics_MSGTYPE DeviceMetrics #define MyNodeInfo_FIELDLIST(X, a) \ X(a, STATIC, SINGULAR, UINT32, my_node_num, 1) \ @@ -1067,7 +1067,7 @@ extern const pb_msgdesc_t ToRadio_PeerInfo_msg; #define LogRecord_size 81 #define MeshPacket_size 347 #define MyNodeInfo_size 210 -#define NodeInfo_size 299 +#define NodeInfo_size 283 #define Position_size 142 #define RouteDiscovery_size 40 #define Routing_size 42 diff --git a/src/mesh/generated/telemetry.pb.h b/src/mesh/generated/telemetry.pb.h index b3bf3df1d..1fb5ea0d7 100644 --- a/src/mesh/generated/telemetry.pb.h +++ b/src/mesh/generated/telemetry.pb.h @@ -40,10 +40,10 @@ typedef struct _EnvironmentMetrics { /* Types of Measurements the telemetry module is equipped to handle */ typedef struct _Telemetry { - /* This is usually not sent over the mesh (to save space), but it is sent - from the phone so that the local device can set its RTC If it is sent over - the mesh (because there are devices on the mesh without GPS), it will only - be sent by devices which has a hardware GPS clock (IE Mobile Phone). + /* This is usually not sent over the mesh (to save space), but it is sent + from the phone so that the local device can set its RTC If it is sent over + the mesh (because there are devices on the mesh without GPS), it will only + be sent by devices which has a hardware GPS clock (IE Mobile Phone). seconds since 1970 */ uint32_t time; /* Key native device metrics such as battery level */