Commit graph

464 commits

Author SHA1 Message Date
bunnie
fda782663a bump version pins for xous change 2023-12-26 00:13:10 +08:00
bunnie
5a0461cb01 make menu building a bit more efficient by not locking when not necessary 2023-12-24 23:51:04 +08:00
bunnie
23a9b0cc34 add more helpful debug output for token claim failure 2023-12-24 22:14:39 +08:00
bunnie
aaa52ca02c fix warning in en-tts build 2023-12-23 23:50:57 +08:00
bunnie
fa3f349a0a bump pins as xous-rs has changed 2023-12-01 21:20:01 +08:00
bunnie
4f75cd76a8 Merge branch 'main' of github.com:betrusted-io/xous-core into main 2023-11-11 23:13:19 +08:00
bunnie
5ad6106daf fix missing arg on unsafe-app-loading 2023-11-11 23:12:51 +08:00
bunnie
d4624124c9
Merge pull request #443 from betrusted-io/chat-status
WIP: Chat status
2023-11-03 13:54:34 +08:00
bunnie
6ab88117f6 bump xous-api-log version & fix version pins 2023-10-31 20:07:28 +08:00
bunnie
699372d8d3 add hashmarks to the status bar when a new name is registered
we can't guarantee that we're running only signed code at this point,
so create a visual indicator of this.
2023-10-31 00:42:25 +08:00
bunnie
c346485832 isolate unsafe app loading features behind unsafe-app-loading feature gate 2023-10-31 00:18:42 +08:00
bunnie
ae7ee770ee expose the GAM minimum redraw period
this could be useful for functions that have to rapidly
toggle events on the screen and want to make sure that
the last event actually is rendered.
2023-10-29 23:02:44 +08:00
bunnie
cdada99705 miss copy-back of the animation state 2023-10-29 19:14:57 +08:00
bunnie
4423339059 move wifi delay hook to the correct area
- remove modal pop-up for wifi connection, and replace with
busy animation
- specify units of delay in the constants (_MS to indicate milliseconds;
this is a convention I'm trying to adhere to)
- partial progress on debugging why the animation isn't running
(value of animation variable is not being passed back at the GAM layer).

Also a general note on coding styles that probably is going to cause
confusion now that more people are contributing to the code base.

Generally, when a lot of "generic" library functions fail, we've been
passing an error message up the stack. However, these functions are
actually meant to be infalliable, and when you kick the error up the
stack you just end up with a panic at an unhelpful location (because
you finally catch the error only at the main loop or something and
by that point there's nothing you can really do about it but panic,
since it's supposed to be an infalliable operation).

As a result I have been trying to tamp down on needless error propagations
and having them fail with a unwrap or expect at the point where the
abstraction should be infalliable. This helps in debugging the actual
failure root cause because you're closer to the line of code that
actually broke, instead of just some line at a generic error handler.

Of course if you build with stack unwinding the top-level unwraps are more
useful because you can peer down into the call chain, but even then,
with the limited screen real estate I think deeply nested failures
would probably overflow any panic display. So even with panic unwinding
I think we stil want to keep the root cause within a few stack frames,
instead of errors being passed up sixteen levels of abstraction before
finally dying.

This only applies to things that are meant to be truly infalliable,
like syscalls that should not fail, or like unpacking a buffer or
memory message that has already been allocated. In this case the errors
are more like asserts, and are helpful if they fail at the line where
they break instead of being passed up the call stack (which was the
original architecture).

Probably I should add a note about this to the Xous Book.
2023-10-29 16:33:03 +08:00
Vihaan Jim
0a7a4fcfc1 Merge branch 'main' of https://github.com/betrusted-io/xous-core 2023-10-14 14:45:50 -04:00
bunnie
d63b5912b1 absorb new xous-rs version 2023-10-10 16:50:00 +08:00
Vihaan Jim
e7445e1b62 Merge branch 'main' of https://github.com/betrusted-io/xous-core 2023-10-05 17:17:26 -04:00
bunnie
83256257e1 bump xous-rs crate to absorb Send derives on Messages
this is necessary for the smoltcp port
2023-10-03 20:54:14 +08:00
Vihaan Jim
5dda363157 Merge branch 'main' of https://github.com/betrusted-io/xous-core 2023-09-30 18:07:58 -04:00
bunnie
9f57ad96fd
Merge pull request #408 from nworbnhoj/chat
mtxchat app and chat library
2023-09-19 19:09:56 +08:00
bunnie
8a67c95d70 cleanup new lints from Rust 1.72 2023-09-17 17:38:49 +08:00
bunnie
478a612c02 commit version bump 2023-09-12 16:25:10 +08:00
nworbnhoj
a7d3b34563 Merge branch 'main' into chat 2023-09-08 13:48:45 +10:00
nworbnhoj
ce8c7f51c3 gam forward ALL rawkeys to the current context even when IMEF active
Forwarding of rawkeys to upper layers is important to enable apps to layer additional functionality on top of base.
2023-09-07 11:10:23 +10:00
Vihaan Jim
41126ec57b Merge branch 'main' of https://github.com/betrusted-io/xous-core 2023-08-29 11:29:39 -04:00
nworbnhoj
6362ff9e4d capture typesetting overflow in ComposedType and pass thru to gam.post_textview() 2023-08-26 03:42:05 +10:00
bunnie
53469a68d0 publish package updates, sync to release tag 2023-08-08 14:35:49 +08:00
Vihaan Jim
2d6e12f6b3 Fix to allow `app-loader' to switch app
`EXPECTED_APP_CONTEXTS' was added to the list of authorized
switchers. I don't think this is ideal, but I think it would be
difficult to come up with a better solution that doesn't make
`app-loader' "special" in some way.
2023-08-05 09:59:20 -04:00
Vihaan Jim
1e645a4b94 Allow registration of GAM names
This allows `app-loader' to register new names (which are then used by
the loaded apps to claim tokens). At the moment this is restricted to
apps that are pre-registered, i.e. included in the image.
2023-08-04 21:32:35 -04:00
bunnie
b127cd093f bump version pins for change to xous-rs 2023-08-03 13:29:39 +08:00
Vihaan Jim
218e783053 Merge branch 'main' of https://github.com/betrusted-io/xous-core 2023-07-26 15:13:59 -04:00
bunnie
51278451a0 update version pins to pull in cramium target 2023-07-19 21:07:56 +08:00
bunnie
b2c64eb61a aesthetic cleanup; change default font for all modals
I decided to go back on the idea of not changing the modals
and now all modals use the new larger font as well.

This creates issue #396, which I will deal with later once
I have the time to do some more testing. I'm pretty sure
some other dialog boxes are broken now too.
2023-07-05 15:13:38 +08:00
bunnie
2f54ae39d4 Merge branch 'fonts' into main 2023-07-05 13:47:26 +08:00
bunnie
dfffa48715 move default system font to gam/src/lib.rs SYSTEM_STYLE
default system font can be statically changed by modifying
the SYSTEM_STYLE constant.

This of course will lead to a request for a dynamically
configurable preference for font size. However, early
on it was decided this is a bad idea. Here's why.

We don't provide for dynamic system-wide font selection
because this adds a lot of complexity to what would otherwise
be static code: this is a deliberate choice to improve code
density and performance. If the system font were dynamically
adjustable, then every character rendered we would potentially
have to query the PDDB for the current system font setting.

The impact of this could be mitigated by caching values but
then what happens when you actually change the font? now
you need a registry to fire messages off to all dependent
crates with cached values to flush their caches and redraw
(or you punt and force a reboot if you change font sizes,
but still, you're creating a dependency on a lot of plumbing
for even the simplest crates).

Plus, with a static font selection, the compiler can take constants
like the font height and compose them with other fitting
parameters into optimized load/stores of borders and spacings
for the static case; if you make it dynamic, all those multiplies,
adds and divides now get pulled into the main rendering loop
and are recomputed all the time. For example, if you have a static
const list of items that need to be rendered, even if the code to
compute the height of the list is written as a for loop, the compiler
will know the list is constant, and the font height is constant,
and it can condense that all into a single number at compile time,
eliminating all the code for the for loop.

If you leave the option open to change that, that entire piece
of code has to be generated and executed even though in practice
nobody changes the parameter.
2023-07-05 13:39:11 +08:00
bunnie
4ac979f0ab update pins, again 2023-07-04 11:20:12 +08:00
bunnie
c9f8f2681b update version pins 2023-07-04 11:09:13 +08:00
Vihaan Jim
fe73bb40e7 Merge branch 'main' of https://github.com/betrusted-io/xous-core 2023-06-29 19:46:42 -04:00
nworbnhoj
80ff0cb52a increase modal ItemName length to 128 2023-06-23 07:26:12 +10:00
nworbnhoj
874086c413 extend checkboxes modal to handle explicit newline in item 2023-06-23 04:26:10 +10:00
bunnie
952ba18fba commit vesrion pin bumps 2023-06-16 01:30:18 +08:00
Jean-Pierre De Jesus DIAZ
2af737b57e
xous-rs: move LANG variable to locales
This change is made with the intention of making the xous-rs crate a bit
more freestanding without depending on the xtask build system.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-06-15 18:23:12 +02:00
bunnie
fbe3cb2a3d bump package numbers to absorb PR #388 2023-05-28 15:58:11 +08:00
bunnie
5a2df4432c technical debt: cleanup UTRA package
- make the "base" field no longer public. It is accessible, but only
through an `unsafe` method, because, it is unsafe.
- add accessors to offest/mask fields. Because, it's not at all
unsafe to access these, and it can be useful for bit-ops that are
not part of the generic set of UTRA.
- add Arc to AtomicCSR, and require `std` for AtomicCSR types.
This should not break anything, I checked inside @foundation-devices
keyOS and they don't seem to be using AtomicCSR anywhere.

The Arc makes it a bit safer to clone the AtomicCSR base pointer
and share it between threads, but it will have an impact on performance.
The USB stack (which requires AtomicCSR) was regression testing and the
impact seems minimal.

Recall that the main purpose of AtomicCSR is to provide a CSR accessor
that does not require a mutable reference to the base object. This
can make certain Rust idioms a bit cleaner. We wrap the base accessor
in Arc+Atomic to try and improve the safety of throwing the borrow
checker under the bus, but it's still not perfect because hardware
mutable state can have side-effects within hardware itself that cannot
be modeled or checked by Rust's borrow checker.
2023-05-23 18:11:24 +08:00
bunnie
d1af22f861 fix trust level of framebuffer canvas
this is some bit-rot that happened to the `ball` demo because
it's currently the only application that uses the framebuffer
canvas.

the trust level of the framebuffer canvas has to be lower than
that of the modals, otherwise a modals box is not allowed to
draw on top of the framebuffer.

in this case, a patch that was applied when trust levels were
refactored was missed on the framebuffer canvas, which caused
the trust level of the canvas to be higher than that of a modals.

Thus, when a modal attempts to pop up over the ball demo,
one just sees the defacement lines but no actal content.
2023-05-21 18:13:20 +08:00
bunnie
6ec99fa7da add multi-line text editing support to TextEntry, and insertion points
TextEntry boxes can now specify "growable" as an option; if this
is set true, then, the fields within are considered to be multi-line
fields that can grow to fill the screen (even pushing lower ui
elements off the screen...); however a text line is limited to
256 characters so generally the overflow issue is hopefully rare-ish.

Left/right arrow keys conjure up an insertion point to allow for
deleting and inserting text in the middle of a field.

The main quirk is that if you enter text that causes a field to grow in
size, the overall dialog box can't grow any larger, so the text simply
overflows into the UI element above the current line, without limit.

Need to check for interactions with other elements that should
not be affected but it passes some simple test cases in `vault`.
2023-05-17 23:27:07 +08:00
Vihaan Jim
87493653df Merge branch 'main' of https://github.com/betrusted-io/xous-core 2023-05-10 17:33:58 -04:00
bunnie
697d44de3d bump version pins to absorb changes to svd2utra etc. 2023-05-03 23:11:12 +08:00
bunnie
8a574f937f bump for xous-rs version pin update 2023-04-27 22:18:30 +08:00
Vihaan Jim
3d3b1c9bcf Working Hello World example
The apploader creates a new process (right now just the hello world
app) and then adds an item to the `app-menu' that allows the app to be
run.
2023-04-22 14:31:16 -04:00