Created
July 12, 2018 05:52
-
-
Save TakehikoShimojima/1dd5096d2d219c1badb019f73e33cdda to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 元のプログラム | |
| void BLEServer::handleGATTServerEvent( | |
| esp_gatts_cb_event_t event, | |
| esp_gatt_if_t gatts_if, | |
| esp_ble_gatts_cb_param_t* param) { | |
| // 省略 | |
| case ESP_GATTS_CONNECT_EVT: { | |
| m_connId = param->connect.conn_id; // Save the connection id. | |
| if (m_pServerCallbacks != nullptr) { | |
| m_pServerCallbacks->onConnect(this); | |
| } | |
| m_connectedCount++; // Increment the number of connected devices count. | |
| break; | |
| } // ESP_GATTS_CONNECT_EVT | |
| // 修正版 | |
| void BLEServer::handleGATTServerEvent( | |
| esp_gatts_cb_event_t event, | |
| esp_gatt_if_t gatts_if, | |
| esp_ble_gatts_cb_param_t* param) { | |
| // 省略 | |
| case ESP_GATTS_CONNECT_EVT: { | |
| m_connId = param->connect.conn_id; // Save the connection id. | |
| if (m_pServerCallbacks != nullptr) { | |
| m_pServerCallbacks->onConnect(this, param); // 引数を追加 | |
| } | |
| m_connectedCount++; // Increment the number of connected devices count. | |
| break; | |
| } // ESP_GATTS_CONNECT_EVT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment