bao-video: fix dependencies and minor API tweaks due to ux-api refactor

This commit is contained in:
bunnie 2025-02-21 17:51:53 +08:00
parent 2172046424
commit 69c2b84e42
3 changed files with 5 additions and 3 deletions

View file

@ -31,8 +31,8 @@ locales = { path = "../../locales" }
# This crate is baosec specific; these flags switch between hosted mode emulation
# (for UI development) and actual hardware targets. In UI development all camera data
# is "faked"
board-baosec = ["cram-hal-service", "cramium-hal"]
hosted-baosec = ["cramium-emu"]
board-baosec = ["cram-hal-service", "cramium-hal", "ux-api/board-baosec"]
hosted-baosec = ["cramium-emu", "ux-api/hosted-baosec"]
cramium-soc = ["utralib/cramium-soc"]
decongest-udma = []

View file

@ -99,7 +99,7 @@ pub fn msg<'a>(fb: &mut dyn FrameBuffer, text: &'a str, ll_pos: Point, fg: Color
pub fn line(fb: &mut dyn FrameBuffer, l: Line, clip: Option<Rectangle>, xor: bool) {
let color: ColorNative;
if l.style.stroke_color.is_some() {
color = l.style.stroke_color.unwrap();
color = l.style.stroke_color.unwrap().into();
} else {
return;
}

View file

@ -21,6 +21,7 @@ use cramium_hal::{
ov2640::Ov2640,
sh1107::{MainThreadToken, Mono, Oled128x128, claim_main_thread},
};
use num_traits::*;
#[cfg(not(feature = "hosted-baosec"))]
use utralib::utra;
@ -133,6 +134,7 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
let mut sh1107 = Oled128x128::new(main_thread_token, cramium_api::PERCLK, &iox, &udma_global);
sh1107.init();
gfx::msg(&mut sh1107, "hello world", Point::new(0, 64), Mono::White.into(), Mono::Black.into());
sh1107.buffer_swap();
sh1107.draw();