feat: add temp stop mode - #1403
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6716d971aa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| self.ambient_light_blackout_until = (*duration_ms > 0).then(|| { | ||
| std::time::Instant::now() | ||
| + Duration::from_millis(u64::from((*duration_ms).min(5000))) |
There was a problem hiding this comment.
Start timing after emitting the first blackout frame
When a positive duration is requested, the deadline starts while the previously illuminated frame is still on the MCU; black frames are only emitted on the next 30 FPS engine tick. Consequently, every blackout can be shorter than requested by up to roughly 33 ms, and values below one tick can expire without ever blanking the LEDs, undermining the ambient-light sample. Emit the blackout immediately or start the deadline when the first black frame is sent.
Useful? React with 👍 / 👎.
| let frame = if blackout { | ||
| [Argb(Some(0), 0, 0, 0); DIAMOND_CENTER_LED_COUNT] |
There was a problem hiding this comment.
Honor blackout requests while the engine is paused
When Diamond has entered UiState::Paused(UiMode::Api) after BootComplete { api_mode: true }, the event handler records this deadline but every front-LED transmission remains guarded by if !paused. An AmbientLightSample request received over D-Bus therefore succeeds without sending any black frame, so it cannot suppress LED interference in API mode. The blackout writes need to bypass this pause or the request must be explicitly unsupported in that mode.
Useful? React with 👍 / 👎.
No description provided.