Reworked metrics structure and split telemetry into device or environ… (#1331)

* Reworked metrics structure and split telemetry into device or environment

* Comment cleanup
This commit is contained in:
Ben Meadors authored and GitHub committed 2022-03-27 09:55:35 -05:00
1 parent 7b8096f5b2
commit ba2fa84ebd
23 files changed
+584 -379

No files matched your search

+3 -1
View File
@@ -490,11 +490,13 @@ void NodeDB::updatePosition(uint32_t nodeId, const Position &p, RxSource src)
/** Update telemetry info for this node based on received metrics
* We only care about device telemetry here
*/
void NodeDB::updateTelemetry(uint32_t nodeId, const Telemetry &t, RxSource src)
{
NodeInfo *info = getOrCreateNode(nodeId);
if (!info) {
// Environment metrics should never go to NodeDb but we'll safegaurd anyway
if (!info || t.which_variant != Telemetry_device_metrics_tag) {
return;
}