implements PLN-0082 render publication boundary

This commit is contained in:
2026-05-25 14:18:40 +01:00
parent 74df4b89ac
commit 41266d3fd5
11 changed files with 54 additions and 35 deletions
@@ -2,6 +2,8 @@ use crate::firmware::firmware_state::{FirmwareState, LaunchHubStep};
use crate::firmware::prometeu_context::PrometeuContext;
use prometeu_hal::color::Color;
use prometeu_hal::log::{LogLevel, LogSource};
use prometeu_hal::primitives::Rect;
use prometeu_hal::{FrameId, GfxUiCommand, RenderSubmission, ShellUiFramePacket};
#[derive(Debug, Clone)]
pub struct SplashScreenStep {
@@ -22,9 +24,6 @@ impl SplashScreenStep {
// Update peripherals for input
ctx.hw.pad_mut().begin_frame(ctx.signals);
// Clear screen
ctx.hw.gfx_mut().clear(Color::ORANGE);
// Draw expanding square
let (sw, sh) = ctx.hw.gfx().size();
let max_size = (sw.min(sh) as i32 / 2).max(1);
@@ -38,8 +37,14 @@ impl SplashScreenStep {
let x = (sw as i32 - current_size) / 2;
let y = (sh as i32 - current_size) / 2;
ctx.hw.gfx_mut().fill_rect(x, y, current_size, current_size, Color::WHITE);
ctx.hw.gfx_mut().present();
let packet = ShellUiFramePacket::new(vec![
GfxUiCommand::Clear { color: Color::ORANGE },
GfxUiCommand::FillRect {
rect: Rect { x, y, w: current_size, h: current_size },
color: Color::WHITE,
},
]);
ctx.hw.publish_render_submission(&RenderSubmission::shell_ui(FrameId::ZERO, packet));
// Transition logic
// If any button is pressed at any time after the animation ends