diff options
author | Sven Gothel <[email protected]> | 2022-01-18 03:31:58 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-01-18 03:31:58 +0100 |
commit | 705c08ff1d87135af532b96338f2ada6199ac5ed (patch) | |
tree | 716997c28b7e984e03bd32542e80fbf7057fc9fe /api | |
parent | c7ea56b310d5da9d50f8934e22f8572d371fe2f0 (diff) |
getHCIConnSupervisorTimeout(): Revise types and add overload (Java)
Diffstat (limited to 'api')
-rw-r--r-- | api/direct_bt/HCITypes.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/api/direct_bt/HCITypes.hpp b/api/direct_bt/HCITypes.hpp index 86ed1ca2..08d59619 100644 --- a/api/direct_bt/HCITypes.hpp +++ b/api/direct_bt/HCITypes.hpp @@ -94,9 +94,9 @@ namespace direct_bt { * @param multiplier recommendation is 6, we use 10 as default for safety. * @return the resulting supervising timeout in 1/10 [ms], suitable for the HCIHandler::le_create_conn() command. */ - constexpr int32_t getHCIConnSupervisorTimeout(const uint16_t conn_latency, const uint16_t conn_interval_max_ms, - const uint16_t min_result_ms=number(HCIConstInt::LE_CONN_MIN_TIMEOUT_MS), - const uint16_t multiplier=10) noexcept + constexpr uint16_t getHCIConnSupervisorTimeout(const uint16_t conn_latency, const uint16_t conn_interval_max_ms, + const uint16_t min_result_ms=number(HCIConstInt::LE_CONN_MIN_TIMEOUT_MS), + const uint16_t multiplier=10) noexcept { return std::max<uint16_t>(min_result_ms, ( 1 + conn_latency ) * conn_interval_max_ms * std::max<uint16_t>(2, multiplier) |