| 144 | } |
| 145 | |
| 146 | void EspNowService::onReceive(const esp_now_recv_info_t* receiveInfo, const uint8_t* data, int length) { |
| 147 | auto lock = mutex.asScopedLock(); |
| 148 | lock.lock(); |
| 149 | |
| 150 | LOGGER.debug("Received {} bytes", length); |
| 151 | |
| 152 | for (const auto& item: subscriptions) { |
| 153 | item.onReceive(receiveInfo, data, length); |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | // endregion Callbacks |
| 158 |
no test coverage detected