Add a mapping for ESP_GATT_ERROR (#296)

This commit is contained in:
J. Nick Koston 2022-10-30 19:39:01 -05:00 committed by GitHub
parent 0d04b1b02d
commit 6ea1da7620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,7 @@ class BLEConnectionError(IntEnum):
ESP_GATT_CONN_TERMINATE_LOCAL_HOST = 0x16
ESP_GATT_CONN_FAIL_ESTABLISH = 0x3E
ESP_GATT_CONN_LMP_TIMEOUT = 0x22
ESP_GATT_ERROR = 0x85
ESP_GATT_CONN_CONN_CANCEL = 0x0100
ESP_GATT_CONN_NONE = 0x0101
@ -25,6 +26,7 @@ ESP_CONNECTION_ERROR_DESCRIPTION = {
BLEConnectionError.ESP_GATT_CONN_TERMINATE_LOCAL_HOST: "Connection terminated by local host",
BLEConnectionError.ESP_GATT_CONN_FAIL_ESTABLISH: "Connection failed to establish",
BLEConnectionError.ESP_GATT_CONN_LMP_TIMEOUT: "Connection failed due to LMP response timeout",
BLEConnectionError.ESP_GATT_ERROR: "Connection failed due to GATT operation error",
BLEConnectionError.ESP_GATT_CONN_CONN_CANCEL: "Connection cancelled",
BLEConnectionError.ESP_GATT_CONN_NONE: "No connection to cancel",
}