Set last byte to 0xFF if it ended at 0x00

As per an idea of @S5NC
This commit is contained in:
GUVWAF
2023-11-27 20:36:48 +01:00
parent 81f57b65e1
commit ef2c6eed05
5 changed files with 13 additions and 10 deletions

View File

@@ -91,6 +91,9 @@ class NodeDB
/// @return our node number
NodeNum getNodeNum() { return myNodeInfo.my_node_num; }
// @return last byte of a NodeNum, 0xFF if it ended at 0x00
uint8_t getLastByteOfNodeNum(NodeNum num) { return (uint8_t)((num & 0xFF) ? (num & 0xFF) : 0xFF); }
/// if returns false, that means our node should send a DenyNodeNum response. If true, we think the number is okay for use
// bool handleWantNodeNum(NodeNum n);