Clean up some inline functions (#5454)

This commit is contained in:
Ben Meadors
2024-11-26 14:00:10 -06:00
committed by GitHub
parent fe86c40145
commit 474f9b5bfb
10 changed files with 48 additions and 43 deletions

View File

@@ -1387,6 +1387,13 @@ meshtastic_NodeInfoLite *NodeDB::getOrCreateMeshNode(NodeNum n)
return lite;
}
/// Sometimes we will have Position objects that only have a time, so check for
/// valid lat/lon
bool NodeDB::hasValidPosition(const meshtastic_NodeInfoLite *n)
{
return n->has_position && (n->position.latitude_i != 0 || n->position.longitude_i != 0);
}
/// Record an error that should be reported via analytics
void recordCriticalError(meshtastic_CriticalErrorCode code, uint32_t address, const char *filename)
{