mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-29 05:01:54 +00:00
add beginnings of nodedb
This commit is contained in:
14
src/mesh-pb-constants.h
Normal file
14
src/mesh-pb-constants.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "mesh.pb.h"
|
||||
|
||||
// this file defines constants which come from mesh.options
|
||||
|
||||
// Tricky macro to let you find the sizeof a type member
|
||||
#define member_size(type, member) sizeof(((type *)0)->member)
|
||||
|
||||
/// max number of packets which can be waiting for delivery to android - note, this value comes from mesh.options protobuf
|
||||
#define MAX_RX_TOPHONE (member_size(DeviceState, receive_queue) / member_size(DeviceState, receive_queue[0]))
|
||||
|
||||
/// max number of nodes allowed in the mesh
|
||||
#define MAX_NUM_NODES (member_size(DeviceState, node_db) / member_size(DeviceState, node_db[0]))
|
||||
Reference in New Issue
Block a user