Revert "fix beacon: add onAdvertRecv to display received beacons"
This reverts commit 8b21bccac2.
This commit is contained in:
14
src/main.cpp
14
src/main.cpp
@@ -305,20 +305,6 @@ public:
|
|||||||
NVIC_SystemReset();
|
NVIC_SystemReset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void onAdvertRecv(mesh::Packet* pkt, const mesh::Identity& id, uint32_t ts, const uint8_t* app_data, size_t app_data_len) override {
|
|
||||||
char buf[128];
|
|
||||||
int n = 0;
|
|
||||||
n += snprintf(buf + n, sizeof(buf) - n, "beacon:");
|
|
||||||
if (app_data_len > 0 && app_data[0]) {
|
|
||||||
int l = app_data_len; if (l > 20) l = 20;
|
|
||||||
memcpy(buf + n, app_data, l); n += l;
|
|
||||||
} else {
|
|
||||||
for (int i = 0; i < 4 && i < (int)PUB_KEY_SIZE; i++) { n += snprintf(buf + n, sizeof(buf) - n, "%02X", id.pub_key[i]); }
|
|
||||||
}
|
|
||||||
buf[n] = 0;
|
|
||||||
send_text(buf);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
SecurityMesh the_mesh(radio_driver, fast_rng, rtc_clock, tables);
|
SecurityMesh the_mesh(radio_driver, fast_rng, rtc_clock, tables);
|
||||||
|
|||||||
Reference in New Issue
Block a user