-
-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hops Away implementation #966
Conversation
Nice! But it leaves an ambiguity: a node with RSSI/SNR displayed is either a neighbor or a packet [possibly rebroadcasted] from an older firmware node. Perhaps try to find a way to differentiate between the two (different color, additional text like |
…when hopStart isn't included on packets (with this info, we can't differentiate between a node which is Hops Away but on old firmware, or nodes which are on new firmware but direct. Both are 0) Check if hopStart is 0 but hopLimit is not 0, if true set hopsAway to -1. Show nodes with hopsAway with -1 with a (!) appended to the RSSI details, to show this probably isn't true. (eg they are using old firmware) Change the default of hopsAway to -1, until we know it is direct (0) or hops away (1+)
Hi @prokrypt , good point. I've now made some changes. It now marks RSSI on nodes with a (!) if by default it marks all nodes with (!) until it knows for certain, at which point it will remove the ! if the are direct, or show Hops Away. if they are running old FW or it doesn't know, it'll continue to mark them with a (!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible lifehack:
if (packet.hopStart < packet.hopLimit) ...
(just a random musing. totally untested!)
I did think that after I commited, I'll try it later on |
Move hopsAway var to end of NodeInfo Class. Schema update due to change above.
hopsAway now imported from radio (installNodeInfo)
* Initial Hops Away feature * Generate our own hopsAway, comparing hopStart to hopLimit * Remove import of hopsAway from device nodeInfo, as this only shows 0 when hopStart isn't included on packets (with this info, we can't differentiate between a node which is Hops Away but on old firmware, or nodes which are on new firmware but direct. Both are 0) Check if hopStart is 0 but hopLimit is not 0, if true set hopsAway to -1. Show nodes with hopsAway with -1 with a (!) appended to the RSSI details, to show this probably isn't true. (eg they are using old firmware) Change the default of hopsAway to -1, until we know it is direct (0) or hops away (1+) * tidy up: move from nested if else to when * Revert Project_Default.xml * Move hopsAway when block in to updateNodeInfo() block above it. Move hopsAway var to end of NodeInfo Class. Schema update due to change above. * hopsAway now follows firmware implementation. hopsAway now imported from radio (installNodeInfo) * reformat --------- Co-authored-by: andrekir <[email protected]>
A basic implementation of Hops Away, closing #922
Modifies SignalInfo, if hopsAway is more than 0 it replaces the RSSI with the number of hops.