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

Abierto
#28 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
67/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
rust
Área
embedded-iot

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Rust
Estrellas
0
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de GoogleBot42/podd

Todos los issues de GoogleBot42/podd

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.