mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-17 16:22:48 +00:00
implement nodeinfo ble charstic
This commit is contained in:
@@ -25,15 +25,24 @@ static NodeNum getDesiredNodeNum()
|
||||
return r;
|
||||
}
|
||||
|
||||
NodeDB::NodeDB() : ourNodeNum(getDesiredNodeNum()), numNodes(0)
|
||||
NodeDB::NodeDB() : ourNodeNum(getDesiredNodeNum())
|
||||
{
|
||||
}
|
||||
|
||||
/// return number msecs since 1970
|
||||
uint64_t getCurrentTime() {
|
||||
uint64_t getCurrentTime()
|
||||
{
|
||||
return 4403; // FIXME
|
||||
}
|
||||
|
||||
const NodeInfo *NodeDB::readNextInfo()
|
||||
{
|
||||
if (readPointer < numNodes)
|
||||
return &nodes[readPointer++];
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/// given a subpacket sniffed from the network, update our DB state
|
||||
/// we updateGUI and updateGUIforNode if we think our this change is big enough for a redraw
|
||||
void NodeDB::updateFrom(const MeshPacket &mp)
|
||||
@@ -52,7 +61,7 @@ void NodeDB::updateFrom(const MeshPacket &mp)
|
||||
|
||||
info->last_seen.msecs = getCurrentTime();
|
||||
info->has_last_seen = true;
|
||||
|
||||
|
||||
switch (p.which_variant)
|
||||
{
|
||||
case SubPacket_position_tag:
|
||||
|
||||
Reference in New Issue
Block a user