Skip to content

Commit

Permalink
Revert "add STK errors" as it fails some tests
Browse files Browse the repository at this point in the history
This reverts commit 27750d5.
  • Loading branch information
funkycode committed Nov 9, 2023
1 parent cacdc0d commit bc92782
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions error_sd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package bluetooth

// #include "nrf_error.h"
// #include "nrf_error_sdm.h"
// #include "ble_err.h"
import "C"

// Error is an error from within the SoftDevice.
Expand Down Expand Up @@ -75,22 +74,7 @@ func (e Error) Error() string {
return "other SoC error"
case e >= C.NRF_ERROR_STK_BASE_NUM && e < 0x4000:
// STK errors.
switch e {
case C.BLE_ERROR_NOT_ENABLED:
return "sd_ble_enable has not been called"
case C.BLE_ERROR_INVALID_CONN_HANDLE:
return "invalid connection handle"
case C.BLE_ERROR_INVALID_ATTR_HANDLE:
return "invalid attribute handle"
case C.BLE_ERROR_INVALID_ADV_HANDLE:
return "invalid advertising handle"
case C.BLE_ERROR_INVALID_ROLE:
return "invalid role"
case C.BLE_ERROR_BLOCKED_BY_OTHER_LINKS:
return "the attempt to change link settings failed due to the scheduling of other links"
default:
return "other STK error"
}
return "other STK error"
default:
// Other errors.
return "other error"
Expand Down

0 comments on commit bc92782

Please sign in to comment.