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

Commit e2f119ab authored by tturney's avatar tturney Committed by Android Git Automerger
Browse files

am 6a08e85a: Fix btwrite timer timeout for Angler (2/2)

* commit '6a08e85a':
  Fix btwrite timer timeout for Angler (2/2)
parents be76179d 6a08e85a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ static void init(thread_t *post_thread) {
  thread = post_thread;

  vendor->set_callback(VENDOR_SET_LPM_MODE, vendor_enable_disable_callback);
  vendor->send_command(VENDOR_GET_LPM_IDLE_TIMEOUT, &idle_timeout_ms);

  idle_alarm = alarm_new();
  if (!idle_alarm) {
@@ -147,6 +146,8 @@ static void enable(bool enable) {
  } else {
    uint8_t command = enable ? BT_VND_LPM_ENABLE : BT_VND_LPM_DISABLE;
    state = enable ? LPM_ENABLING : LPM_DISABLING;
    if (state == LPM_ENABLING)
        vendor->send_command(VENDOR_GET_LPM_IDLE_TIMEOUT, &idle_timeout_ms);
    vendor->send_async_command(VENDOR_SET_LPM_MODE, &command);
  }
}