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

Đang mở
#28 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
67/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
rust
Lĩnh vực
embedded-iot

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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).

Ngôn ngữ chính
Rust
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của GoogleBot42/podd

Tất cả issue của GoogleBot42/podd

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.