move hardbeat handling into backend, add publish lanestate for lighttower
This commit is contained in:
@@ -7,4 +7,11 @@ std::array<uint8_t, 6> macStringToBytes(const char *macStr) {
|
||||
sscanf(macStr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &bytes[0], &bytes[1],
|
||||
&bytes[2], &bytes[3], &bytes[4], &bytes[5]);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
std::string macToString(const std::array<uint8_t, 6> &macBytes) {
|
||||
char macStr[18];
|
||||
snprintf(macStr, sizeof(macStr), "%02x:%02x:%02x:%02x:%02x:%02x", macBytes[0],
|
||||
macBytes[1], macBytes[2], macBytes[3], macBytes[4], macBytes[5]);
|
||||
return std::string(macStr);
|
||||
}
|
||||
Reference in New Issue
Block a user