Commit graph

201 commits

Author SHA1 Message Date
Mara Huldra
aa360a9733 Update minifb to 0.23.0
Minifb 0.23 fixes a serious wayland keyboard issue.
2022-04-20 18:28:16 +02:00
bunnie
5d2c65cb6c fix missing update to display in panic handler 2022-04-10 16:57:04 +08:00
bunnie
46624addd0 clean up comments and review panic handler before push 2022-04-10 15:52:57 +08:00
bunnie
9254d6830a your host desires not your guru meditations
ommmmmmmmm
2022-04-10 04:47:34 +08:00
bunnie
7353c3ab9c add guru meditations 2022-04-10 04:42:02 +08:00
bunnie
c503316c3d refactor suspend/resume ordering
Add a "Later" stage, and have exactly one "Last" stage.

"Last" to suspend is the ticktimer -- this is crucial for
basically everything else to work. The other really
low level stuff that needs to work to the last minute is
now in the "Later" bin.
2022-03-30 02:30:39 +08:00
bunnie
04d074de1b fix hosted mode build 2022-03-29 22:55:27 +08:00
bunnie
1455ea6d8b clean up the suspend/resume path for the screen and enforce redraw 2022-03-29 22:50:25 +08:00
Alex Tibbles
f6030fe213
build fix for 5452fae33c 2022-03-28 17:01:25 -04:00
bunnie
5452fae33c harmonize blitstr2 and graphics-server to an i16 pixel representation
previously blitstr2 is using usize for x/y coords, which means that
for layout purposes points could not go to the top or left boundary
without causing arithmetic overflow. Of course, you want to render
everything on-screen, but, as we have multi-line text with overflow
possibility, it's reasonable to be able to use negative coordinates
to locate text boxes that flow into the visible region.

This of course means that occassionally you can come out with
things like "negative widths", but even then, there can be reasonable
uses for this as an intermediate in calculations that ultimately
arrive at a positive result.
2022-03-28 23:17:18 +08:00
bunnie
287aea90b6 bump to latest version of minifb 2022-03-28 17:49:03 +08:00
Blake Smith
77b5e7a2bb During sleep, clear the rest of the screen, to avoid
any secrets being persistently visible on the display.
2022-03-20 15:35:02 -05:00
bunnie
c44f794dfe baseline before moving onto the next stage 2022-03-11 00:03:31 +08:00
bunnie
2b33371a36 add emoji back into the tts set
this is helpful for debugging
2022-03-10 18:08:56 +08:00
bunnie
21ad8d9283 change en-audio to en-tts 2022-03-10 15:38:55 +08:00
bunnie
4df39797c1 fix issue #101 based on @xobs changes 2022-02-15 17:36:53 +08:00
bunnie
32c3f03609 prevent double-injections on windows 2022-02-10 03:04:05 +08:00
bunnie
feec219070 fix bs/del/enter on posix platforms 2022-02-10 02:59:47 +08:00
bunnie
fd5c6568d1 trim out some excess redraw calls that are slowing down boot 2022-02-05 18:55:46 +08:00
bunnie
a7c9027d05 make the COM reset no longer open loop; unblock as soon as EC responds 2022-02-05 15:44:47 +08:00
bunnie
827888ccbb fix up the REFCOUNT on connections
Was doing disjoint loads and stores on an Atomic, really, should
be using the fetch_add, fetch_sub variants to be proper.

Didn't seem to impact anything but maybe there's a future version
of me that high fives me for doing this.
2022-01-31 23:13:10 +08:00
bunnie
2db96e17b0 modify minifb integration to use host keymaps for most printable characters
this allows e.g. dvorak key maps to work while still picking up
all of the special keys that don't correspond to to any unicode
characters
2022-01-25 23:03:57 +08:00
bunnie
2909115e3d move mini-fb's home into the betrusted-io repo
this will let more people maintain it while @xobs moves to merge
his contributions into the mainline...
2022-01-25 22:51:45 +08:00
bunnie
11f726223b update to @gsora's patch to improve hosted mode performance
We run a branch of minifb because we need the `set_key_state`
function, which is not available on the main branch. This
function is necessary to extract raw scan keycodes from the
keyboard so we can respond to e.g. menu and prediction emulation
keys (Home and Fn keys). The mainline minifb crate eats all
of those key events and does not pass them on.
2022-01-25 22:36:38 +08:00
bunnie
8e13d6bcdf add drawlists to the GAM and gfx abstractions
this helps to prevent race conditions and improves performance
2022-01-24 16:33:01 +08:00
bunnie
35fd307dbf major refactoring around how initializations are done for canvases
trust levels now default to a mid-level, with the password
modals explicitly tested for by the Context logic (the idea
being to deny any untrusted canvases the ability to render
inverted text).

ball bounce app also basically works, and context
switching between the bounce app and the main menu
is working too.
2022-01-24 01:58:48 +08:00
bunnie
ce12d96e16 some documentation and maintenance notes 2022-01-23 13:21:36 +08:00
bunnie
2b46f21ae8 remove dependency on blitstr v1 entirely 2022-01-23 04:08:32 +08:00
bunnie
afd525002d initial attempt to move the font resources into the loader 2022-01-23 03:23:06 +08:00
bunnie
0cafd10e28 refactor status bar to take advantage of the new fonts 2022-01-22 18:25:39 +08:00
bunnie
001b07ac74 clean up password modal box 2022-01-22 01:41:55 +08:00
bunnie
2642e6c075 various UX fixes that take advantage of the new font rendering engine 2022-01-22 00:10:31 +08:00
bunnie
481cf81824 insertion points working, commit test case 2022-01-21 18:50:34 +08:00
bunnie
c999576afd debug insertion point failures 2022-01-21 18:16:02 +08:00
bunnie
1ba7a2d0c1 cleanup debug cases 2022-01-21 18:06:55 +08:00
bunnie
9455f11ff1 incorporate 2x blitstr fonts and sizes; fix some corner cases 2022-01-21 17:28:23 +08:00
bunnie
7277b7bc1d start to refactor out the old blitstr v1 apis 2022-01-21 15:01:56 +08:00
bunnie
0677753680 it's not a flaming mess anymore, but still a lot more tuning to do 2022-01-21 02:35:46 +08:00
bunnie
13b7d73ce9 word wrapping seems to work and is tested now. 2022-01-21 02:30:58 +08:00
bunnie
7961dbddee word wrapping take 2 - this time with ~~tests~~ 2022-01-21 00:34:12 +08:00
bunnie
356d95a266 yet another refactor of the word wrapping
Really clear up the roles and structures of word wrapping.

Significantly, we have now figured out that the word wrapper
should be the word wrapper, and that the text bounds should
be computed by a text bounds computation.

Conflating flexible text bounds with word wrapping makes
the math really hard.

So, the word wrapper always works with a bounding area starting
at 0,0, and will wrap until it hits a Point designated as its
absolute max bounds.

The returned typeset block is referenced to 0,0, and then it
is shifted to the correct location by the rendering function.

This externalizes the computation of the final location plus
the rendering bounds to the outer functions that need to care
about this, thus simplifying the word wrapper significantly.
2022-01-20 18:30:13 +08:00
bunnie
083ef6a804 it's not totally lolfailing but needs a lot of cleanup still 2022-01-19 03:50:40 +08:00
bunnie
a46c07b4be initial attempt to integrate blitstr2
this just grafts in the new crate, while leaving the old crate
unscathed. once this is somewhat functional we'll excise the old
crate and reformat the loader for the "hard binary" image of
the fonts.
2022-01-19 03:29:53 +08:00
bunnie
797e5bd7c4 follow-on set of commits related to the previous revert 2022-01-17 23:52:58 +08:00
bunnie
80bf673731 massage the loader to work
however -- it is now very slow
2022-01-17 01:10:41 +08:00
bunnie
b3788a54af clarify the dependency policy 2022-01-10 16:50:10 +08:00
bunnie
995915ed4e nail down a couple more dependencies, and add a policy note to Cargo.toml
Each Cargo.toml now includes a comment which remnids maintainers
of the dependency policy for Xous (that is, nail down every dependency
to the minor number).
2022-01-10 15:54:27 +08:00
bunnie
dd943c5416 pin down versions and harmonize versions across servers
Versions are pinned down to the minor number. Yes, this means that
we don't automatically pull in features and bug updates from crates.io,
but it also means we don't pull in new attack surfaces and code that
hasn't been tested or reviewed. I'd like this process to be very deliberate
and not automatic for Xous.

The `rand` crate is almost pinned down to a single version, except
for an odd dependency that's pulled in by hosted mode that depends
on rand 0.8.4 via a subordinate dependency via the `tempfile` crate.
Pondering if it's worth it to try and eliminate that, because the
0.8.4 version doesn't get compiled into any version that touches
real hardware. It just makes it harder to analyze the Cargo.lock
file, mostly. I think I'll leave it as-is.
2022-01-10 15:39:55 +08:00
bunnie
c5fe1bc99b add sequencing to suspend/resume order of operations
this is necessary because we want to make sure that the SPINOR
service does not shut down before the PDDB service finishes syncing
its disks.
2022-01-10 13:45:56 +08:00
bunnie
489a26dd11 fix an issue where we don't decrement the connection counter on drop 2022-01-05 20:01:54 +08:00