| 23 | static constexpr uint8_t BROADCAST_ADDRESS[ESP_NOW_ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; |
| 24 | |
| 25 | void 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 | |
| 37 | void ChatApp::disableEspNow() { |
| 38 | if (service::espnow::isEnabled()) { |
nothing calls this directly
no test coverage detected