add packet_id_bits to work with old devices

This commit is contained in:
geeksville 2020-05-30 16:15:27 -07:00
parent 34972b9dc0
commit f7b0fa8d5f

View file

@ -546,9 +546,25 @@ message MyNodeInfo {
/// the last time we discarded preferences)
uint32 error_count = 9;
/// How many bits are used for the nodenum. If zero it is assumed we use eight bit node nodenums
/// New device loads will user 32 bit nodenums.
uint32 nodenum_bits = 10;
/// How many bits are used for the packetid. If zero it is assumed we use eight bit packetids
/// New device loads will user 32 bit packetid.
uint32 packet_id_bits = 10;
/** The current ID this node is using for sending new packets (exposed so that the phone
can self assign packet IDs if it wishes by picking packet IDs from the opposite side of the pacekt
ID space).
Old device loads (older that 0.6.5 do not populate this field, but all newer loads do).
FIXME: that we need to expose this is a bit of a mistake. Really the phones should be modeled/treated
as 1st class nodes like any other, and the radio connected to the phone just routes like any other.
This would allow all sorts of clean/clever routing topologies in the future.
**/
uint32 current_packet_id = 11;
/// How many bits are used for the nodenum. If zero it is assumed we use eight bit nodenums
/// New device loads will user 32 bit nodenum.
uint32 node_num_bits = 12;
/// FIXME - add more useful debugging state (queue depths etc)
}