Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ad9c08b authored by Chris Manton's avatar Chris Manton
Browse files

btm: Specify supervision timeout in human readable units

Toward loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Ib703546fb8e4e01584961d8a4beb4ab82d13ceb6
parent 4c906d87
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -488,7 +488,8 @@ void DumpsysAcl(int fd) {
        fd, "    [classic] link_policy:%s",
        link_policy_text(static_cast<tLINK_POLICY>(acl_conn.link_policy))
            .c_str());
    LOG_DUMPSYS(fd, "    link_super_tout:0x%04x", acl_conn.link_super_tout);
    LOG_DUMPSYS(fd, "    link_supervision_timeout:%.3f sec",
                ticks_to_seconds(acl_conn.link_super_tout));
    LOG_DUMPSYS(fd, "    pkt_types_mask:0x%04x", acl_conn.pkt_types_mask);
    LOG_DUMPSYS(fd, "    disconnect_reason:0x%02x", acl_conn.disconnect_reason);
    LOG_DUMPSYS(fd, "    chg_ind:%s", (btm_pm_mcb.chg_ind) ? "true" : "false");
+4 −0
Original line number Diff line number Diff line
@@ -36,6 +36,10 @@ constexpr char kPrivateAddressPrefix[] = "xx:xx:xx:xx";
       .replace(0, strlen(kPrivateAddressPrefix), kPrivateAddressPrefix) \
       .c_str())

inline double ticks_to_seconds(uint16_t ticks) {
  return (static_cast<double>(ticks) * 0.625 * 0.001);
}

namespace bluetooth {
namespace shim {