- Add chandra-camera-isp.c (C/OpenMP) for Quad-Bayer unpack, CCM, and tone mapping, with a NumPy fallback when it is not built - Add non-blocking contrast-detection VCM autofocus, with lens subdev discovery on the sensor's I2C bus - Tune Quad-Bayer AE: a video-mode vblank cap, damped steps, and full analog gain before extending blanking - Record variable-frame-rate video through a streaming Matroska muxer, and count dropped frames - Ship libcamera IPA tuning files for imx376, imx519, and uncalibrated sensors - Map camera buffers by fd and sync them with dma-buf ioctls
This commit is contained in:
1 parent
851c39d827
commit
52b42890d6
34 files changed
+2851
-364
No files matched your search
@@ -129,3 +129,63 @@ test "the Wi-Fi and airplane switches, and status only without NetworkManager" {
|
||||
click_row(comp, 1, 20U)
|
||||
assert_eq(fake.actions.length(), n)
|
||||
}
|
||||
|
||||
///| Whether any pixel in `r` looks like Noto Color Emoji's olive-green turtle (`g > r && g > b + 40`).
|
||||
fn has_turtle_pixels(px : @renderer.Pixmap, r : @scene.Rect) -> Bool {
|
||||
for y = r.y; y < r.y + r.h; y = y + 1 {
|
||||
for x = r.x; x < r.x + r.w; x = x + 1 {
|
||||
match px.pixel(x, y) {
|
||||
Some(c) => {
|
||||
let cr = c.r.to_int()
|
||||
let cg = c.g.to_int()
|
||||
let cb = c.b.to_int()
|
||||
if cg > cr && cg > cb + 40 {
|
||||
return true
|
||||
}
|
||||
}
|
||||
None => ()
|
||||
}
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
///| Whether any Text draw op inside `ops` contains `sub`.
|
||||
fn ops_have_text(ops : Array[@scene.DrawOp], sub : String) -> Bool {
|
||||
for op in ops {
|
||||
match op {
|
||||
Text(_, _, s, _, _, _, _) | MonoText(_, _, s, _, _, _, _) =>
|
||||
if s.contains(sub) {
|
||||
return true
|
||||
}
|
||||
_ => ()
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
///|
|
||||
test "Wi-Fi SSID with turtle emoji survives wasm boundary and renders in colour" {
|
||||
let comp = new_comp("net-turtle")
|
||||
let fake = @network.FakeNet::new(
|
||||
{ ..net_status(), name: "🐢" },
|
||||
[
|
||||
{ ssid: "🐢", signal: 72, secured: true, active: true, saved: true },
|
||||
{ ssid: "🐢 5G", signal: 55, secured: true, active: false, saved: false },
|
||||
],
|
||||
)
|
||||
comp.shell.set_network_backend(fake as &@network.NetBackend)
|
||||
click_module(comp, "network", 1U)
|
||||
comp.damage.mark_full()
|
||||
let sg = comp.compose_scene().unwrap()
|
||||
assert_true(ops_have_text(sg.panel_ops, "🐢"))
|
||||
assert_true(ops_have_text(sg.panel_ops, "Connected to 🐢 (72%)"))
|
||||
assert_true(ops_have_text(sg.panel_ops, "🐢 5G"))
|
||||
let px = @renderer.render_scene(sg)
|
||||
let slot = comp.shell.slot_of("network")
|
||||
let btn = comp.shell.slot_rect(slot)
|
||||
let pop = comp.shell.slot_popup_rect(slot)
|
||||
assert_true(btn.w > 0 && pop.w > 0)
|
||||
assert_true(has_turtle_pixels(px, btn))
|
||||
assert_true(has_turtle_pixels(px, pop))
|
||||
}
|
||||
Reference in new issue
Block a user