MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / enableEspNow

Method enableEspNow

Tactility/Source/app/chat/ChatApp.cpp:25–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23static constexpr uint8_t BROADCAST_ADDRESS[ESP_NOW_ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
24
25void ChatApp::enableEspNow() {
26 static uint8_t defaultKey[ESP_NOW_KEY_LEN] = {};
27 auto config = service::espnow::EspNowConfig(
28 settings.hasEncryptionKey ? settings.encryptionKey.data() : defaultKey,
29 service::espnow::Mode::Station,
30 1, // Channel 1 default; actual channel determined by WiFi if connected
31 false,
32 settings.hasEncryptionKey
33 );
34 service::espnow::enable(config);
35}
36
37void ChatApp::disableEspNow() {
38 if (service::espnow::isEnabled()) {

Callers

nothing calls this directly

Calls 2

EspNowConfigClass · 0.85
enableFunction · 0.85

Tested by

no test coverage detected