| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Signed-off-by: Niklas Roslund <nroslund@kth.se>
|
Is it possible to get a review on this PR or get it merged? Would be deeply appreciated! @ianmcorvidae |
Sorry, something went wrong.
|
Hi, I've been short on time lately but giving it a look now. It's worth noting that lora.ignore_incoming is mostly if not completely depreated -- the --set-ignored-node and --remove-ignored-node arguments that modify the nodedb are much preferred. But we may as well clean up the old version if it can be, so I'll give it a look. |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks pretty good, one thing I'd like to see moved elsewhere. I'll keep an eye on this and probably merge it soon if you don't get back to it.
Sorry, something went wrong.
| def _to_node_num(self, nodeId: Union[int, str]) -> int: | ||
| """Normalize node id from int | '!hex' | '0xhex' | 'decimal' to int.""" | ||
| if isinstance(nodeId, int): | ||
| return nodeId | ||
| s = str(nodeId).strip() | ||
| if s.startswith("!"): | ||
| s = s[1:] | ||
| if s.lower().startswith("0x"): | ||
| return int(s, 16) | ||
| try: | ||
| return int(s, 10) | ||
| except ValueError: | ||
| return int(s, 16) | ||
|
|
There was a problem hiding this comment.
I like this structure, but I think this function belongs in meshtastic.util, perhaps something like to_node_num there. (side note that most of the functions there are camelcase rather than underscores, but I think we may as well follow pep8 when we can).
Doesn't need to block merging, but if you're able to move this there that'd be appreciated!
Sorry, something went wrong.
There was a problem hiding this comment.
This has now been moved to util! Seems to be a bit of mixture between camelcase and underscores but i kept to_node_num.
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good, thanks!
Sorry, something went wrong.
|
heh, I think that failure is due to another PR. I'm gonna merge it and fix locally if needed |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #833
Summary
Why
CLI operations around ignore list were brittle:
Behavior
Notes
Firmware still shows packets in logs; enforcement is firmware-level and out of scope here.
No breaking changes—CLI becomes more permissive and robust.