Authentication-Results: mail-b.sr.ht; dkim=permerror header.d=ccss.com header.i=@ccss.com Received: from mail1.ccss.com (mail1.ccss.com [159.203.255.73]) by mail-b.sr.ht (Postfix) with ESMTP id 3504311EF1F for <~hdasch/gl-bluetooth-devel@lists.sr.ht>; Mon, 19 Apr 2021 05:03:47 +0000 (UTC) Received: by mail1.ccss.com (Postfix, from userid 114) id C65E9BF950; Sun, 18 Apr 2021 22:03:46 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail1.ccss.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=13.0 tests=ALL_TRUSTED,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.2 Received: from ccss.com (unknown [192.168.76.11]) by mail1.ccss.com (Postfix) with ESMTP id D370EBF87B for <~hdasch/gl-bluetooth-devel@lists.sr.ht>; Sun, 18 Apr 2021 22:03:44 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ccss.com (Postfix) with ESMTP id A736F176071A for <~hdasch/gl-bluetooth-devel@lists.sr.ht>; Sun, 18 Apr 2021 22:03:44 -0700 (PDT) Received: from ccss.com ([127.0.0.1]) by localhost (ccss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bqsoAsM3aMip; Sun, 18 Apr 2021 22:03:39 -0700 (PDT) Received: from klaatu.ccss.com (klaatu.lan [192.168.42.3]) (Authenticated sender: hugh) by ccss.com (Postfix) with ESMTPSA id 22F7317605D6; Sun, 18 Apr 2021 22:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ccss.com; s=mail; t=1618808619; bh=GRJRkXHdFvOXZ6dpMi7LP7hKREYNbgWQBIE8yi23UqE=; h=From:To:Cc:Subject:Date:From; b=StTHjErmub6UYuhKftiH6geXMGEc0RfJ0qt+22V1hUBnuJ8EaAvTu4oxsH/lkWrzo iY6L5Dx63gNWICUUwIfLFGrW5pHaHquQnVrrmVOcKOXVTzhr8Pq9GzWxAyCBm3oCmQ 9tYVrFo7x9ODlsoWgw9smqo3vC54e3lkBvV2zms729RzMxfNsAC4PWAFEJ6KUhWhyu sGntqPUkOALYh34VGsVCYVEz0MSIzQ5L4wMvHu/8zHuxSdwdQN8OcD511rNh/q15yb RIz9KpXPlmk+1hBuEbGZ7Eb8jPc3wXREizEvT/bXAilCl9ReTIVVhL8uUEI5T1J5QI qnMV8zcOCkTGQ== From: Hugh Daschbach To: ~hdasch/gl-bluetooth-devel@lists.sr.ht Cc: Hugh Daschbach Subject: [PATCH v2] Heartrate not updated after initial connect. Date: Sun, 18 Apr 2021 22:03:36 -0700 Message-Id: <20210419050336.12750-1-hugh@ccss.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Broken by 30eca31. --- No, that is still wrong. It is glbthr-heart-rate that could be nil. Fix a docstring function reference while we are at it. glbt-heartrate.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glbt-heartrate.el b/glbt-heartrate.el index d62cb14..88b9bd4 100644 --- a/glbt-heartrate.el +++ b/glbt-heartrate.el @@ -381,7 +381,7 @@ https://www.bluetooth.com/specifications/specs/." (glbt-debug "glbthr--handle-characteristic-changes: lost contact with %S" path) (alert "Heart rate sensor contact lost.")) - (when (and hr (= 0 glbthr-heart-rate)) + (when (and glbthr-heart-rate (= hr glbthr-heart-rate)) (setq glbthr-heart-rate hr) (force-mode-line-update))))) @@ -420,7 +420,7 @@ This is invoked automatically by the command ‘glbthr-start-heart-rate’" Argument PATH is the D-Bus object name of the heart rate monitor device. Ignore the request if the heart rate monitor is not currently connected. This is automatically called by the command -‘glbt-stop-heart-rate’" +‘glbthr-stop-heart-rate’" (glbt-debug "glbthr--disconnect-hr-monitor: %S" path) (when (not (glbt-is-connected-p path)) (glbt-debug "glbthr--disconnect-hr-monitor: Not connected.")) -- 2.31.1