Enabling away mode while an alarm is vibrating leaves it running (schedule stops cancelling it)

オープン
#28 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
67/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
rust
領域
embedded-iot

調査の方向性

Read crates/podd-core/src/sensor/manager.rs, especially the RegisteredCommand can_run closures at lines 426–446 and get_alarm_cmd at lines 688–702. Trace how the schedule handles an alarm already running when away mode turns on, then check the relevant scheduler tests or add a focused regression test. Done means the schedule emits the intensity-0 cancel in this case while still preventing the alarm from starting when away mode is on.

索引モデルが issue の本文から書いたものです。

説明

bug

The left/right alarm RegisteredCommand can_run closures short-circuit to None whenever away is true: if state.vibration_enabled && !away { get_alarm_cmd(...) } else { None } (crates/podd-core/src/sensor/manager.rs:426-432 and 440-446). get_alarm_cmd is also what emits the intensity-0 cancel when an alarm is running but shouldn't be (manager.rs:688-702). So if an alarm starts (away off) and away mode is then toggled on mid-window, the scheduler never issues the cancel and the alarm keeps vibrating until the firmware's own max-duration timeout. The away-mode gate should still allow the out-of-window/should-not-run cancel path to fire. Double-tap and API ClearAlarm still work, but the schedule no longer stops it.


Filed from a repo-wide code audit (working tree at bcad746).

主要言語
Rust
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

GoogleBot42/podd のほかの issue

GoogleBot42/podd の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。