Commit graph

113 commits

Author SHA1 Message Date
bunnie
dbb0a75118 bump versions
have to absorb a version change due to xous-semver change

might as well also update the utra/svd generator dependencies
since that's been held off for a long time now.
2025-10-06 13:23:18 +08:00
bunnie
d3c55b218f turn on the power supply for the camera 2025-10-01 23:34:35 +08:00
bunnie
b86664d279 move camera clock pin setup into the camera driver in Xous.
previously this was setup in the loader, which is a bit of an
abstraction bodge.
2025-10-01 15:00:40 +08:00
bunnie
889262d20c remove font mapping from bao-video; fonts are now in our space by default 2025-09-25 16:12:47 +08:00
bunnie
179e178e96 fix up formatting that changed due to the flag day 2025-09-18 21:31:54 +08:00
bunnie
1255bf12d9 FLAG DAY: fix all names to harmonize around 'bao1x'
The code base had evolved through several code names, interim
names, company names and chip names that alternatively did or did
not exist.

Baochip is the definitive name of the company, and the Baochip1x
(full part number BAO1X2S4F-WA) is the definitivey part number of
the SoC. For convenience, the part number is shortened to 'bao1x'
in most feature flags and variable references.

This commit fixes all of the odd names and removes some unmaintained
early targets.
2025-09-18 21:25:51 +08:00
bunnie
5dae83d404 improve panic screen formatting 2025-09-13 15:35:34 +08:00
bunnie
0df2cb73f7 fixup bao-video deps 2025-09-09 22:24:55 +08:00
bunnie
1c8a3a3ee9 migrate to using the latest rqrr with perfromance enhancements 2025-09-06 22:47:48 +08:00
bunnie
ac458c4b07 reduce pixel math (do mirroring in camera module)
also add some more analytics output
2025-08-20 03:07:12 +08:00
bunnie
1d950033af add base64 dumping of captured images for off-line optimization 2025-08-19 22:44:15 +08:00
bunnie
381b7ec90e remove gpio frame-sync 2025-08-10 01:55:25 +08:00
bunnie
b63371a56f turn off autotest for now 2025-05-21 10:23:15 +08:00
bunnie
e2379821e6 republish xous-rs to fix cargo test 2025-05-11 15:36:17 +08:00
bunnie
8a4959056b bump version for xous crate update - commit so we can publish crates 2025-05-11 14:45:24 +08:00
bunnie
30fcc3016f use bao-video to route the acquire/release of the modals focus
it has to route through here anyways, so this is the sensible
place to also forward on the keyboard release/acquire messages
2025-05-06 01:47:55 +08:00
bunnie
2699146d62 integrate gc2145 into userspace
couple of notes:

- bw threshold is now dynamic, based on the average of the previous frame
- performance is a bit slower than ideal, because of the SPI back pressure
bug preventing us from reading out the video at full speed. This should
be better on NTO.
- rotation introduced so that the preview image should align up
with what we'll have in the final camera v. display orientation in
the baosec product
- tested against the TOTP test suite (edent.codeberg.page/TOTP_Test_Suite/)
and it can quickly capture all of the basic valid tests.
2025-05-01 16:41:03 +08:00
bunnie
535153e0cb switch cameras and move YUV setting into driver 2025-05-01 04:09:52 +08:00
bunnie
5021afcbda quiet down debug 2025-04-28 01:18:43 +08:00
bunnie
f204fd4c54 add breadcrumb note 2025-04-21 00:38:38 +08:00
bunnie
7f860e058c add handler for object list drawing 2025-03-04 19:07:10 +08:00
bunnie
938e8388e0 add modals acquire/release logic to the graphics layer 2025-03-04 02:05:21 +08:00
bunnie
cb0cfb3f2c cleanup dependencies 2025-02-28 17:31:14 +08:00
bunnie
5dcf0e33aa customize graphics testing routine for small screen 2025-02-28 17:30:51 +08:00
bunnie
e829b4b4fb cleanup debug info in main 2025-02-28 16:37:28 +08:00
bunnie
bda9340045 cleanup pass-by ref change it blitstr api 2025-02-28 16:36:51 +08:00
bunnie
002bc74d3f fix text rotation 2025-02-27 21:38:03 +08:00
bunnie
4f067dc090 add gfx-testing option to bao-video 2025-02-26 14:46:47 +08:00
bunnie
cd34d0179e harmonize the apis in bao-video 2025-02-26 14:46:01 +08:00
bunnie
a66a541488 pass the cramium-soc flag to blitstr2 when compiling for hardware 2025-02-24 02:30:07 +08:00
bunnie
f922274070 fix configuration 2025-02-24 00:58:38 +08:00
bunnie
0eef3cd0e4 cleanup warnings 2025-02-23 18:20:29 +08:00
bunnie
1e007035cb modify bao-video to use shared handlers 2025-02-23 18:08:50 +08:00
bunnie
172333c078 accommodate panic handler 2025-02-23 16:52:49 +08:00
bunnie
ef6ce40117 implement panic handler - first draft, untested 2025-02-23 16:52:32 +08:00
bunnie
8c9abf6c5b add implemnetation for most graphics primitives
this is mostly a copy of what's in graphics-server. Perhaps
we can find a way to share the code between the two, but I
am going to leave it duplicated for now because it's unclear
if I can use this implementation as-is, or if it needs lots
of modifications.

If it turns out to basically work without mods, then, we can
wrap a bunch of the opcode dispatch into mega-function perhaps
that takes a display and opcode as parameters and wraps a lot
of the boilerplate into a re-usable routine.
2025-02-23 12:05:00 +08:00
bunnie
e157d6e242 add placeholder panic server 2025-02-23 12:01:01 +08:00
bunnie
69c2b84e42 bao-video: fix dependencies and minor API tweaks due to ux-api refactor 2025-02-21 17:52:41 +08:00
bunnie
8859f3eff5 cleanup warnings 2025-02-20 20:50:43 +08:00
bunnie
547aac5056 fix lifetime issue on irq handler binding
using scoping for feature flags is tricky. also this
is like, all totally unsafe code.
2025-02-20 15:49:05 +08:00
bunnie
5ffacf63f3 cleanup bao-video to use the new API
also condense main into a single routine again, now that
we have gone through the trouble of creating interoperable
APIs.
2025-02-20 15:06:15 +08:00
bunnie
14bfa42aec fixup feature specifiers 2025-02-18 23:21:41 +08:00
bunnie
b76f02bb11 get past some configuration issues 2025-02-13 17:38:14 +08:00
bunnie
edab1ddcf2 refactor bao-video structure to facilitate hw and hosted modes 2025-02-13 17:30:04 +08:00
bunnie
c0822a6109 refactor bao-video to use ux-api 2025-02-02 07:02:53 +08:00
bunnie
45a8eb2227 stage tomls for version bump: try_send added to xous-ipc 2024-12-16 18:50:11 +08:00
bunnie
a57f3f1977 rework camera main loop to be interrupt driven
this will free up some time for concurrent processing instead of
spin-waiting on new frames
2024-12-04 16:15:58 +08:00
bunnie
93b9ec00bf bump version numbers on all the packages so we can absorb num-derive changes 2024-12-02 19:14:11 +08:00
bunnie
83e26ff4c7 update num-derive dependency
this became mandatory in 1.83 to remove warnings. I think it
should have no impact on functionality.
2024-12-02 18:52:59 +08:00
bunnie
e42b7195b0 add notes about performance improvement for the future 2024-11-19 22:21:48 +08:00
bunnie
265805ac94 cleanup warnings 2024-11-19 22:17:07 +08:00
bunnie
4a99341269 cleanup warnings 2024-11-14 22:19:40 +08:00
bunnie
fac7adca35 improve UX a little bit 2024-11-14 00:36:24 +08:00
bunnie
0bad04856b debug fixed point underflow issue 2024-11-14 00:34:02 +08:00
bunnie
fc95e8b7b3 update findings 2024-11-14 00:33:39 +08:00
bunnie
c2edfee2fd try to fix timeout issue on camera capture 2024-11-14 00:15:51 +08:00
bunnie
2e25ebff9f upgrade the linederivation to use std
this eliminates occasional storage overflow errors during searching
2024-11-14 00:03:49 +08:00
bunnie
3135407e8e live QR decoding now working!
Got up to version 8 to decode, although version 8 is a bit fussy.

Fairly sensitive to camera focal distance - hard to see focus
issues on B/W display. This needs to be improved in the HW.
2024-11-13 23:29:50 +08:00
bunnie
2b5aab23e0 add fractional iterator for conversion of pixels to modules 2024-11-13 23:29:26 +08:00
bunnie
8002d522b0 add support for neighborhood estimation and version guessing 2024-11-13 23:28:54 +08:00
bunnie
45b5dc1d95 flip image vertically as it comes from the camera fb
this orients it correctly for processing by the QR pipeline
2024-11-12 23:22:15 +08:00
bunnie
dc0fd47ff4 add an option to decongest udma
There is a hardware bug that causes SPIM RX packets to fail when
the UDMA bus is busy (like when streaming video). This causes
swap memory to fail because it relies on the SPIM bus.

This patch causes the video to sample *after* any computation
happens, so that any swap memory that might be hit taken care of.

This reduces the efficiency of the loop somewhat, because without
the decongesting, we could kick off the camera read and do useful
computation while the camera streamed data. Now we have to keep
them separate to work around this bug.
2024-11-08 00:14:21 +08:00
bunnie
2692d374c6 add some test scaffolding for userspace video processing
The whole graphical interface - camera + display & QR code processing -
is incorporated into a single process space to minimize on the amount
of swapping/memory message passing necessary to implement a low-latency,
high-frame rate video interface.

The current service just starts a camera-to-display loopback
while searching for and aligning QR code markers, without consulting
any other service on whether it should do that or not. Suitable
for debug and performance characterization, but not usable for
product integration.

The good news is we're getting an acceptable frame rate on
the camera during search mode with the kernel running.
2024-11-07 16:14:29 +08:00