Commit graph

519 commits

Author SHA1 Message Date
nworbnhoj
0bf71b84c1 implement gam Bitmap Dither
- remove depencency on dither crate
- Burkes diffusion scheme
2022-06-14 04:27:04 +10:00
bunnie
3803a580cf Merge branch 'main' into insert_menu_item 2022-06-10 21:38:33 +08:00
bunnie
e32ea4d3f5 fix #174 2022-06-10 21:36:53 +08:00
bunnie
21c8c09050 create a API to insert an item at an offset 2022-06-10 21:29:33 +08:00
Gianguido Sorà
014dcfd612 status: add wifi management menu 2022-06-10 12:20:39 +02:00
bunnie
64f008b4fa add debugging facilities to gam 2022-06-07 16:28:26 +08:00
bunnie
741a6ab45e fix dynamic resize redraw bug
for some reason I was setting the state of a canvas to not drawable
when the clip rectangle was being reset, causing dynamic dialog boxes
to become static if the content inside changes size.

I think this is an artifact of a previous generation of this code,
so commenting that out, but left a breadcrumb is case I'm wrong.
2022-06-07 16:27:16 +08:00
bunnie
ebd4e7a1ba improve dynamic notifications / kbhit reporting 2022-06-06 03:46:57 +08:00
nworbnhoj
4b12915df0 performance improvement for gam bitmap from Img 2022-06-04 20:43:34 +10:00
nworbnhoj
7f90e6e999 change dithering algorithm to BURKES 2022-06-04 17:01:43 +10:00
nworbnhoj
767461fa16 remove image crate dependency from gam Bitmap 2022-06-04 16:34:00 +10:00
nworbnhoj
66b0665d08 remove unnecessary image processing step 2022-06-04 09:04:24 +10:00
nworbnhoj
beb2778ce6 implement gam bitmap.rotate90() 2022-06-02 14:23:09 +10:00
bunnie
6f1bbb49d1 cleanup whitespace issues 2022-06-01 22:33:04 +08:00
bunnie
27c4d5e01d return the key hit to the listener of the notification 2022-06-01 22:32:03 +08:00
Sean Cross
d342d7a885 apps/services: remove xous::xous_main macro usage
This macro will be removed, since it is no longer necessary. Remove this
macro across the project and replace it with a standard `main()`
function.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-01 11:54:24 +10:00
Sean Cross
3ae9d8abf0 apps/services: remove xous::xous_main macro usage
This macro will be removed, since it is no longer necessary. Remove this
macro across the project and replace it with a standard `main()`
function.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-05-31 13:33:30 +08:00
bunnie
116015dff8 fixups and debug 2022-05-27 22:45:23 +08:00
bunnie
a8e7809087 fixup feature fest 2022-05-27 17:41:22 +08:00
bunnie
7d020182d4 integrate ditherpunk as a feature 2022-05-27 17:28:15 +08:00
bunnie
c8165be0fb Merge remote-tracking branch 'jb/dither' into bunnie-dev 2022-05-27 16:44:17 +08:00
nworbnhoj
f19b2ac939 implement auto size rotate & center for Image Modal 2022-05-24 12:08:07 +10:00
nworbnhoj
5952f80763 add missing modal image.rs 2022-05-22 22:06:55 +10:00
nworbnhoj
ba1f9d017a exclude troublesome features from dither crate 2022-05-22 14:17:11 +10:00
nworbnhoj
7f66291a38 implement Image modal
Now you can:
let mut input = std::env::current_dir().unwrap();
input.push("../services/modals/src/tests/bunny.png");
let img = Img::<RGB<u8>>::load(&input).unwrap();
modals.show_image(img).expect("image failed");
2022-05-21 06:42:27 +10:00
nworbnhoj
11f6fb4aeb implement gam bitmap (dither)
This enables

let mut input = std::env::current_dir().unwrap();
input.push("bunny.png");
let mut bm = Bitmap::from(Img::<RGB<u8>>::load(&input).unwrap());
bm.translate(Point::new(10,100));
gam.draw_bitmap(self.gid, bm);
2022-05-18 22:12:53 +10:00
Gianguido Sorà
dbff05d1f2 fix: clamp TextEntryPayloads content slice to the real amount of fields used in the modal 2022-05-14 11:49:15 +02:00
bunnie
9419ed6078 update release, fix warning 2022-05-10 17:36:52 +08:00
bunnie
9e350e739a
Update i18n.json
add translations
2022-05-10 17:05:59 +08:00
nworbnhoj
dd1ce051d1 refine qrcode handling
- expand max text.len to 4096
- throw error on overrun
- simplify qrcode rendering (reduced memory & math)
- correct module size by 1px
2022-05-08 10:00:41 +10:00
nworbnhoj
0e561802ce enable notification modal text + qrcode
change the notification modal to accept the primary message and an
Option of independent text to display as a qrcode

pub fn show_notification(&self, notification: &str, qrtext:Option<&str>) -> Result<(), xous::Error> {}
2022-04-24 21:29:15 +10:00
bunnie
ce5a81878c fix for issue #145 2022-04-24 00:16:27 +08:00
bunnie
987f40f5de minor fixes to multi-modals input
- track field heights using the drawing height directly
- use an &mut reference in the text processing section so changes stick
- other minor cosmetic improvements
2022-04-22 17:44:25 +08:00
bunnie
2c3143f790 Merge branch 'main' into multi-text-modals 2022-04-22 15:54:18 +08:00
Gianguido Sorà
08bbce93f6 modal: add method to return a vec of payloads
content() automatically filters out non-dirty items
2022-04-13 15:48:46 +02:00
Gianguido Sorà
c702025283 gam: add dirty bool to TextEntryPayloads
Useful to filter out unused entries.
2022-04-13 15:47:26 +02:00
bunnie
cd8c762c55 patch up QR code PR, change method signature as discussed
now any modal notification can also render as a QR code
2022-04-08 15:19:56 +08:00
nworbnhoj
2a957e55cd add as_qrcode to Notification modal 2022-04-08 14:16:15 +10:00
Gianguido Sorà
8123393a7d Merge branch 'main' into feature/multi-text-modals 2022-04-07 16:39:03 +02:00
Gianguido Sorà
b541c56c7e make sure to clean all TextEntryPayloads after enter button has been pressed 2022-04-05 16:40:41 +02:00
Gianguido Sorà
5c975fdee4 make single-field modals accept a placeholder 2022-04-05 16:28:58 +02:00
Gianguido Sorà
ba347f6c79 add placeholders, current selection highlight 2022-04-05 16:18:43 +02:00
bunnie
b936414d11 emit a warning if apps don't recognize focus changes, instead of a panic 2022-04-03 17:49:12 +08:00
bunnie
d026102d41 Limit scope of Foreground/Background messages to just app changes
Don't send FocusState::Foreground / FocusState::Background messages
to Layouts that are non-App type. This allows this to be used more
reliably as a signal of if the background is the running app or not,
rather than if it is merely the drawable canvas.
2022-04-01 22:54:33 +08:00
Gianguido Sorà
0b62a2657a feature: generalization of modals.get_text()
Added a get_text_multi() method on modals which builds, shows and returns text taken from a modal view with a given amount of fields.

Calling get_text() is equal to a call to get_text_multi() with fields = 1.
2022-03-31 19:24:53 +02:00
Gianguido Sorà
83e61f5f1b feat: add wiring for multiple TextEntryPayloads drawing 2022-03-31 17:54:22 +02:00
bunnie
fa10cfc040 minor typo fix 2022-03-31 02:38:08 +08:00
bunnie
b32cde6870 mute a debug message 2022-03-29 04:54:57 +08:00
bunnie
1130bda4a8 add a UX delay to help ensure redraw order when switching apps 2022-03-28 15:25:08 +08:00
bunnie
83da511dc5 fix double redraw issue on menu close 2022-03-28 14:38:26 +08:00
bunnie
b246a369d4 lay in another layer of tts functionality
now shellchat can talk, and password entries are a thing.

next up: debug oom issues in STT when we start doing really big
strings.
2022-03-11 02:37:48 +08:00
bunnie
e8b13fcb44 integrate TTS into more dialog boxes and modals
also tighten up the `blocking` method for TTS for prompts that
absolutely should not be truncated or overriden.
2022-03-10 23:40:35 +08:00
bunnie
ac059eae48 retrofit more tts in various corner cases 2022-03-10 18:05:33 +08:00
bunnie
21ad8d9283 change en-audio to en-tts 2022-03-10 15:38:55 +08:00
bunnie
71d9cc38af fix (or at least improve) simultaneous tts initiation crash 2022-03-10 04:00:09 +08:00
bunnie
446317bdd4 add speech rate library call and default setting
350 wpm was the requested default!
2022-03-09 03:48:12 +08:00
bunnie
3dae62a20d always redraw the full extent of secure modals 2022-02-05 23:20:41 +08:00
bunnie
57783e076c refactor canvas draw states to use interior mutability
Makes the code a lot easier to debug, so I could fix some
subtle issues.
2022-02-05 23:01:16 +08:00
bunnie
5ef0d9f159 narrow up the time for pddb to request password box
now that excess redraws on boot have been ferretted out
2022-02-05 19:00:34 +08:00
bunnie
fd5c6568d1 trim out some excess redraw calls that are slowing down boot 2022-02-05 18:55:46 +08:00
bunnie
3b6a696fc4 minor fixes, push for CI check 2022-02-05 02:40:41 +08:00
bunnie
b4a34bd9ec add busy-wait queuing for alerts in case multiple alerts pop up
this case happens when e.g. you're asking for a password but
then the connection manager throws an error.
2022-02-05 02:03:56 +08:00
bunnie
08421999ad part-way through a refactor of trust levels to prevent alerts from popping over password boxes 2022-02-04 23:59:20 +08:00
bunnie
c07101f41c drop fat-fingered inputs after menu or dialog box close 2022-02-04 17:11:24 +08:00
bunnie
30910dbd4f add keyboard layout setting and retention
Keyboard setting is "the one and only" exception to user settings
that are saved without encryption. This is because you need your
keyboard layout to be set in order for you to type your password.
Thus, this needed a bit of a special-case to handle its storage record.

We decided to lop off 1 page from the loader and have it store
the keyboard layout code.

Let's hope we can have the discipline to really just store that
one word of information and not later be like "gee wally, you have
a whoooole 4092 unused bytes of space we can cram unencrypted
user settings in, sure would be a waste to not put those use those".
2022-02-03 02:46:37 +08:00
bunnie
05df4486ee incremental changes toward a manifest-format app system 2022-02-02 03:57:00 +08:00
bunnie
5c91645ede Merge branch 'i18n-jp' into bunnie-dev 2022-02-01 01:04:43 +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
Jeanie
58e8120526 ja translations added 2022-01-30 19:23:49 +09:00
bunnie
dc2877457e add menu wrap-around
makes nav a bit faster on deep menus
2022-01-25 15:12:33 +08:00
bunnie
65bd1d416a improve the iconography of the status bar 2022-01-25 15:02:25 +08:00
bunnie
b5faa1eb55 minor tweaks to the repl demo 2022-01-25 02:31:54 +08:00
bunnie
617fc3b8f6 bug fixes in the REPL demo 2022-01-25 01:57:16 +08:00
bunnie
02b2e4a6e7 deprecate request_focus api and make initial focus setting within the GAM
request_focus is "dangerous" because any random server could
request a UX context to pop up. There is a checked version
that requires a GAM token that should be used, but, this leaves
the question of how does the initial app that's supposed to be
focused gets set.

A small mod to the UxRegistration call is made to check for
the name of the default focus app, and when it is seen, a thread
is fired off to request focus for that app. That allows us
to deprecate this otherwise dangerous call.
2022-01-25 00:55:14 +08:00
bunnie
583c2e172b add a demo REPL app to help users get started with something more interactive 2022-01-24 19:06:58 +08:00
bunnie
7193f7003e some tweaks to improve the UX rendering quality 2022-01-24 17:07:45 +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
6089672960 add localization to the demo app 2022-01-24 04:42:35 +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
0fadaf3546 trust level is stored on a per-canvas basis, removing duplicate record 2022-01-23 18:34:17 +08:00
bunnie
7addcf5f72 update a comment 2022-01-23 18:26:34 +08:00
bunnie
0a885671ba refactor contexts into a separate file, improves manageability of GAM 2022-01-23 18:19:07 +08:00
bunnie
a0c4304d29 add focus/defocus messages to the GAM
this allows animation-heavy apps to be backgrounded and not
continue to run their animation while backgrounded.
2022-01-23 17:12:14 +08:00
bunnie
d2a054ec33 laying in some framework for user applications
The first "app" is just going to be a whole-framebuffer
demo that gets raw keys and does some stuff on the screen.
It's the starting point if you wanted to eg. write a simple
video game or something for the device, but you didn't care
about much of the other UX sugar.
2022-01-23 15:52:17 +08:00
bunnie
6653d42114 cleanup UX context registry
it's now a much smaller nightmare to maintain the registry, as all
the items are concentrated into a single location
2022-01-23 14:31:21 +08:00
bunnie
2b46f21ae8 remove dependency on blitstr v1 entirely 2022-01-23 04:08:32 +08:00
bunnie
0cafd10e28 refactor status bar to take advantage of the new fonts 2022-01-22 18:25:39 +08:00
bunnie
747891eaad clean up some minor details on UX formatting 2022-01-22 01:51:02 +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
7277b7bc1d start to refactor out the old blitstr v1 apis 2022-01-21 15:01:56 +08:00
bunnie
3c87091565 cleanup the policy token straggler 2022-01-17 04:36:40 +08:00
bunnie
b7b0bdc852 convert menu infrastructure to the "menumatic" API call
hopefully this makes menus a bit easier
2022-01-16 17:30:32 +08:00
bunnie
ff2d68b392 clean up menu to use std primitives 2022-01-16 02:04:58 +08:00
bunnie
dd4042f315 cleanup excess space in Tokens 2022-01-15 17:04:49 +08:00
bunnie
c2bd695167 fix uniformity issue in remapping random numbers for deface op 2022-01-12 14:53:00 +08:00
bunnie
a8d7c7e9e2 cleann up the oqc test 2022-01-12 02:01:33 +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
75fe309059 clean up an old warning and explain its presence 2022-01-07 23:14:43 +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
bunnie
77e44075a6 add debug help to tokens, remove the unused RTC token entry 2022-01-03 19:20:31 +08:00
bunnie
421a3814d8 clean up some warnings before moving on to further integration 2022-01-02 15:07:48 +08:00
bunnie
c027b617b6 update some docs to refer to the modals refactor 2021-12-17 02:59:18 +08:00
bunnie
0fb1bea428 add radio buttons and checkboxes to the modals meta-handler 2021-12-17 00:32:44 +08:00
bunnie
91836e5574 add a warning about the fixed size of the IPC payload for selected checkbox items 2021-12-16 23:21:54 +08:00
bunnie
44453bcbde refactor checkboxes and radiobuttons to use dynamically allocated lists 2021-12-16 23:16:21 +08:00
bunnie
f3f3e677d2 turn the validator error message into a newtype
this allows us to fine-tune the error message static size parameter
later on more easily
2021-12-15 13:53:53 +08:00
bunnie
60d6d08933 basic framework for modal API wrapping in place 2021-12-15 13:46:24 +08:00
bunnie
c852f5fbbc light refactor to use HashMap instead of linearly searched array
GAM predates `std` so we had a linear array for storing UX
contexts, that had to be manually grown every time we added
an element. Convert that to a Heap-allocated structure.
2021-12-14 13:47:36 +08:00
bunnie
de4e84abf5 starting in on the larger system integration of the PDDB
Trying to find a new approach to making dialog boxes that
are cleaner and don't require as much code repetition. Probably
about to go on a long tangent.
2021-12-13 14:24:14 +08:00
bunnie
4882016d08 add a graphics test routine for OQC
invoked via the GAM, callable exactly once per boot for up
to 60 seconds.
2021-09-16 01:00:22 +08:00
bunnie
8ce0e8c789 intermediate checkpoint of failing memory-passing for keyrawstates 2021-09-15 17:59:13 +08:00
bunnie
ccbe7c479f improve braille testing flags, make them more consistent
i wonder if there isn't a workspace-level way to flip a flag...
2021-09-07 19:11:54 +08:00
bunnie
3188225030 modularize the layout crate 2021-08-24 19:19:06 +08:00
bunnie
5df8275c00 major refactor of the keyboard server
This one gets rid of a ton of awful, crufty code that was pre-std.
It also removes the following features:

- raw scancode reporting: nobody uses them, and they've never been tested.
They can be added in later if someone wants to e.g. build a MAME emulator.
- multi-listener: there is no good reason to do this on a secure system.
multi-listener is basically a keyboard logger. It's better if we just
control it to a single keyboard listener.
2021-08-22 17:13:36 +08:00
bunnie
4d3a8c2ced fix issue #81
background clears were going beyond their borders, and also
introducing a new border of their own. fixed.
2021-08-22 02:18:02 +08:00
bunnie
5706c9e525 fix stale comment 2021-08-22 02:17:53 +08:00
bunnie
20fd465acd a little more cleanup/re-org 2021-08-22 00:37:53 +08:00
bunnie
ca8bead919 improve organization of the modal crate 2021-08-22 00:29:42 +08:00
bunnie
c3fc3ff23f add bbram provisioning sequence 2021-08-19 04:22:28 +08:00
bunnie
ee4368e747 gateware update code in place 2021-08-13 06:00:21 +08:00
bunnie
aaf16dcf5e light refactor to the GAM to solve a deadlock issue
This is a "no good choice" situation but there is a problem with
progress bars.

You want progress bars to update quickly, and you don't want
to have to context switch out for the entire graphics stack to
come back to you to approve the drawing of your progress bar update.

On the other hand, you don't want to short-circuit all the checks
on drawing stuff to the screen for the sake of progress bars --
right now, there are a number of checks in place to make sure you
can't draw stuff on parts of the screen you shouldn't, to avoid
fake messages and dialog boxes.

I had managed to work out a way to get a dialog box to redraw without
violating the security rules -- each redraw is checked by the defacing
routine -- however, due to the way I was computing the height of
the modal I was causing the dialog box to be resized to its largest
size and then shrunk again to fit the text every iteration. This
in essence also caused the defacement routine to run repeatedly,
which caused the GAM to also issue repeated redraw requests to
the main loop.

These redraw requests can't be serviced until the task being tracked
by the progress bar is completed. As the progress bar gets redrawn
almost a hundred times as part of the task, roughly a hundred messages
arrive in the server's queue before it can handle a single one.

This results in a deadlock situation on completion of the progress
bar, because we want to fire off a message to ourselves to go to
the next state in the Ux routine.

There are a few possible solutions to this:

1. Multi thread the heck out of the routine doing the progress bar,
so the dialog box and the slider are each in their own threads
with their own responders and then the thing doing the computation
is doing some Mutex-guarded-Arc thing.

2. Do some very unsafe bodge to allow sliders to do direct draws
that are unchecked

3. Add a check so that if the size of the dialog box doesn't change,
defacement isn't recomputed and thus redraw messages aren't sent back.

(1) doesn't work for a number of reasons -- in a general case, it's
probably OK, but it does cause a lot more memory usage (and we are
lean on memory); but more importantly, for this use case, our routine
is interacting with CSRs and those don't implement Send so you can't
pass them into a thread via a closure. You could maybe put the dialog
boxes themselves into an Arc Mutex thing but because this routine
was heavily coded to re-use the heavyweight Ux resources this becomes
a bit cumersome to code.

(2) is terrible

(3) ended up working and what is in this commit. I think it's OK
because a progress bar generally doesn't require changing the
size of a window to update its state; therefore the redraw is
deface-safe (since you aren't changing the bounds of what you were
already approved to draw in). Of course, if you have some sort
of a progress bar implementation that changes the size of the messages
reported up top so that the dialog box has to change size over and
over again, you still end up in the deadlock situation!
2021-08-12 01:25:35 +08:00
bunnie
0ccd487f5a test case now failing, now we can solve the problem faster 2021-08-11 23:22:15 +08:00
bunnie
bdd70f9502 stash to figure out build issue 2021-08-10 22:41:22 +08:00
bunnie
352b725f7a add an abort option to the initialization flow 2021-08-10 02:48:32 +08:00
bunnie
29f7cbe53b refactor main menu to give options for rootkey operations 2021-08-10 01:54:35 +08:00
bunnie
ec6a3fd1a3 self-signing working, but the patch to use the SHA hash engine seems to be disregarded... 2021-08-09 03:27:43 +08:00
bunnie
bc6ec8caf4 initial key provisioning demo working 2021-08-07 22:21:49 +08:00
bunnie
8b83fb7c65 remove heapless, go to libstd for all collections!!!!
*fistpump*
2021-08-04 01:25:32 +08:00
bunnie
68ea69c2ed Merge branch 'bunnie-dev' into main 2021-08-03 17:22:10 +08:00
bunnie
d86c78eea8 partial progress on self-signing 2021-08-03 04:58:34 +08:00
Sean Cross
b86e0a65cd services: recognize xous as a hardware OS
Support `xous` as a valid OS. This allows us to build the entire kernel
under this target.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 18:11:48 +08:00
bunnie
d112d49524 clean up UX work before switching back into crypto work 2021-08-01 17:52:15 +08:00
bunnie
2714c9eb13 link in some READMEs so that rustdoc pulls them in
also add some bread crumbs on the more user-facing APIs to
help beginners out. Need to do a good spring cleaning of the
rustdoc tree, though. looks pretty terrible as it is.
2021-08-01 16:08:27 +08:00
bunnie
e968798fff fix defacement ordering 2021-08-01 15:06:28 +08:00
bunnie
cfd5e18549 add a progress bar/slider element. getting there. 2021-08-01 04:02:15 +08:00
bunnie
1d3eaa4f9a fix a stale dialog box message 2021-07-31 04:02:18 +08:00
bunnie
d7d052b6ff refactor ux flow, now on a good footing 2021-07-31 03:27:16 +08:00
bunnie
17be958d87 convert defacement to an XOR
this ensures that "all back" dialog boxes that are fake
are also defaced (as opposed to just drawing black, which
would not deface a "fake" dialog box).
2021-07-29 22:13:44 +08:00
bunnie
86a5c34a5b refactor root-keys to use the latest UX features
UX flow for requesting passwords is now more or less complete...

this yak is shaved?
2021-07-29 03:30:03 +08:00
bunnie
78c0b30382 refactor menu
- move it to the status thread, out of the GAM
- this allows us to refactor the menu code into its own module
2021-07-29 01:04:22 +08:00
bunnie
8b992bbe38 fix shorter-than-one-line text fitting problem
right character gets cut off, but it's because the cursor is
the top left of the last character. add one character height plus
margin to the shortening, because the margin itself could be 0
in many case.
2021-07-29 01:02:44 +08:00
bunnie
03a9719884 Merge branch 'bunnie-dev' into main 2021-07-28 23:58:46 +08:00
bunnie
8cdf3c148b clean up warnings before merge to main 2021-07-28 23:58:15 +08:00
bunnie
f5a9cce4ac fix minor bugs in rtc set routine 2021-07-28 23:15:53 +08:00
bunnie
e60478d8d3 checkbox and radiobox now working. 2021-07-28 23:00:25 +08:00
bunnie
9ae5feab78 refactor to add helper threads to the UX format; documentation 2021-07-28 17:35:25 +08:00
bunnie
9f3615fd3d extend RTC setting with UX
not because this is so important, but because it's a simple
test case that exercises a lot of features.
2021-07-28 04:27:14 +08:00
bunnie
b6c443145c extend modal functions; refactor status into its own server 2021-07-28 01:01:39 +08:00
bunnie
9b51edfe6c add backspace (derp) 2021-07-27 18:00:09 +08:00
bunnie
4affdabc73 password modal box now nominally works 2021-07-27 17:30:37 +08:00
bunnie
1a65cd3389 password dialog box basic layout is kind of there
a little ugly, but...this has already taken too long.
2021-07-27 04:40:12 +08:00
bunnie
53f35f9928 intermediate work toward getting the password box going
lots of changes, maybe finally getting out of the UX rathole now
that basic localization is in place
2021-07-26 00:51:22 +08:00
bunnie
86e113b678 add locale to front-end; update menus to suppress 🔇characters automatically 2021-07-26 00:49:33 +08:00
bunnie
2b57e1c4f8 add static localization 2021-07-25 23:46:03 +08:00
bunnie
bc5d262431
Update README.md 2021-07-23 17:19:50 +08:00
bunnie
556f0aaea5 beginnings of a password dialog system 2021-07-22 03:04:16 +08:00
bunnie
5d62af49a5 simple signature checks in the bootloader now
checks xous.img as a single blob before accepting it.
2021-07-12 17:16:22 +08:00
bunnie
84a2e9f768 fix status bar so that it redraws out of suspend/resume
the bootloader modifies the screen, so all elements must
be redrawn regardless of the pervious state change!
2021-07-11 18:47:19 +08:00
bunnie
00be94d913 devboot mode support 2021-07-03 21:08:39 +08:00
bunnie
6825e2e7e8 reset the i2c machine every new transaction 2021-06-25 03:41:42 +08:00
bunnie
75dca6bd4c checkin for a rollback to sanity check some things 2021-06-25 02:09:42 +08:00
bunnie
7ea45b8e5b fix bias in deface lines 2021-06-21 00:54:18 +08:00
bunnie
e9499586f1 right. status loop was a mess.
classic code rot resulting from adding stuff that was never designed
to be in part of what was originally just a test loop to show
uptime.

cleaned it up, idle CPU load drops from 8% -> 2-3%.
2021-06-20 01:55:57 +08:00
bunnie
f4fbe84b78 improve redraw performance on menu
it helps to actually redraw the menu instead of relying
upon status updates to redo the Ux.
2021-06-20 00:44:59 +08:00
bunnie
c0d4cbe81d make the menu object more generic; demo with emoji selection 2021-06-19 04:44:21 +08:00
bunnie
b5630b74ce update documentation 2021-06-19 01:36:35 +08:00
bunnie
2b5ba61552 add some useful messages on boot for the hosted mode users 2021-06-19 01:05:42 +08:00
bunnie
69a22adee9 menus basically working 2021-06-19 00:25:18 +08:00
bunnie
aa967a5a17 quiet up hosted mode build warnings 2021-06-18 22:37:08 +08:00
bunnie
769c90764c menu Ux is now nominally doing something menu-like 2021-06-18 19:35:03 +08:00
bunnie
65cc8dd90c defacement first-pass seems working 2021-06-18 17:40:00 +08:00
bunnie
0f937037e4 just getting to the point of implementing defacement
menu now pops up. does nothing, but we can at least
change contexts for the Ux into a different Ux theme.
2021-06-18 16:20:56 +08:00
bunnie
62c9737bbc tenuous addition of a menu object
things don't crash, but...haven't really validated if they work, either!
2021-06-18 04:10:41 +08:00
bunnie
3664ff6718 clean up keyboard event handling so the GAM is the gateway server
this allows the GAM to handle authentication for listening requests.
2021-06-17 01:12:25 +08:00
bunnie
03bcf18348 clean up enum-based dispatch for Layouts, pulling in enum_dispatch crate. 2021-06-16 17:41:47 +08:00
bunnie
356b07dacc works on "real hardware" but some issues with hosted mode 2021-06-16 17:03:28 +08:00
bunnie
5301f4af20 major refactor of the Ux -- can create, redirect I/O contexts
getting ready for Precursor to do more than just one thing.
2021-06-16 04:50:26 +08:00
bunnie
13a8cf7417 it helps to save the file before committing it 2021-06-15 17:46:10 +08:00
bunnie
8cd84d3be0 Merge branch 'bunnie-dev' into ux-refactor
incorporates the upstreamed xous-names connection count patch
2021-06-15 17:45:07 +08:00
bunnie
eee9f4e765 refactor xous-names to permit only a fixed number of connections
this prevents less trusted processes from connecting to servers
after the kernel initializations are done.

this works so long as we don't have disconnects from the kernel
servers. In order to support disconnects we will also need a
way to re-enumerate the SID to guarantee that we don't have a re-use
problem. But for now, the kernel is not designed with any practical
disconnect mechanism; there is no code that calls the Quit mechanism
on any server.
2021-06-15 17:41:14 +08:00
bunnie
4058b56aae intermediate checkin of UX refactor 2021-06-15 12:50:29 +08:00
bunnie
7e141aba91 commit some API changes before making even more API changes
yo dawg i herd u liek API changes so I made API changes to ur API changes
2021-06-14 02:51:41 +08:00
bunnie
0db9ad9e6f add status bar extension to inform of security states
- inverted text indicates a trusted message. policy is enforced in the GAM.
- we don't have a way to lock the USB port yet; but at least now it's communicated.
2021-06-13 04:40:50 +08:00
bunnie
fadc9c29ab Merge remote-tracking branch 'origin/master' into bunnie-dev 2021-06-02 03:59:25 +08:00
bunnie
25e6bced00 add power-on utilization reporting
there is now an extra field in the status bar that gives
the %'age of time that the clocks are running.
2021-06-02 01:08:31 +08:00
bunnie
30aa794f30 add reference counting on connections between servers
the connection number is re-used for all objects created
within a process space, so you can't `Drop` the connection
immediately when an object goes out of scope. You have to
make sure all instance of the object go out of scope. This
patch adds reference counting to all the objects so that
the `Drop` function works as intended.
2021-05-21 16:24:30 +08:00
Sean Cross
eb7895d601 xous: add a return code to TerminateProcess
As part of this refactor, make `terminate_process()` a divergent call.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-20 11:01:00 +08:00
bunnie
5d4e716e1b add status thread mechanism to check charger state 2021-05-16 16:30:58 +08:00
bunnie
b06e8d2a81 fix issue with datetime on hosted mode on windows
just monkey-patch over the call in hosted mode...
2021-05-16 02:26:24 +08:00
bunnie
08a86749fe fix hosted mode bugs 2021-05-09 01:13:16 +08:00
bunnie
391122823d refactor heapless version in attempt to debug issue that cropped up in xous-names
somehow, updating the toolchain has broken the FnvIndexMap implementation
2021-05-08 18:44:23 +08:00
bunnie
abf308e82d try to trace down issue #61 2021-05-02 16:39:08 +08:00
bunnie
a2280639d9 forgot to uncomment a line 2021-05-02 16:13:06 +08:00
bunnie
05df98d1c1 disable suspend/resume support in hosted mode
hosted mode doesn't have suspend/resume support, and it's
not worth debugging subtle issues on that side of the fence
that seem to be OS-dependent.
2021-05-02 16:10:51 +08:00
bunnie
8b29fc4dd3 make the sleep note screen a little more aesthetic 2021-05-02 03:57:40 +08:00
bunnie
9997749c4c fix soc version 2021-04-27 21:32:43 +08:00
bunnie
4ecd7c06ac trying to fix renode stuff, but not quite there 2021-04-23 21:49:13 +08:00
bunnie
c385f4bdd5 fix hosted mode boot vs RTC alarm clear 2021-04-23 17:59:12 +08:00
bunnie
4022462144 fix RTC wakeup alarm code 2021-04-23 17:51:12 +08:00
bunnie
076ee3588e add blank screen for ship mode 2021-04-22 18:07:41 +08:00
bunnie
fc4ae9851f revert braille-specific debug config 2021-04-16 18:57:34 +08:00
bunnie
d807098ed1 more mods for the braille branch 2021-04-16 05:34:08 +08:00
bunnie
1841233d2c add "slow mode" for braille debugging 2021-04-16 04:21:21 +08:00
bunnie
aed2325f68 fix some minor bugs in hosted mode
memory is not page-aligned so `if !cfg()`-out the alignment
checks in hosted mode
2021-04-09 17:31:36 +08:00
bunnie
8b93dd0c63 RTC server now basically working
There is an issue with the rtc commandline time checking
with respect to unhooking its callback, maybe related to
the new disconnect/destroy server code
2021-04-09 05:24:29 +08:00
bunnie
24e9408ce0 fix most of the inter-server bugs
still some issue with the predictions showing a longer length
than expected, but this is progress.
2021-04-06 02:48:55 +08:00
bunnie
8c12dbe2af found a bug. 2021-04-06 01:52:26 +08:00
bunnie
9ba2fb134c refactor most major modules, but Xous now crashes 2021-04-05 23:50:00 +08:00
bunnie
4a504943dc part-way through the GAM refactor 2021-04-05 05:47:17 +08:00
bunnie
d6fd42b593 COM refactor of callbacks 2021-04-02 16:40:17 +08:00
bunnie
470b5c6440 finalize API refactor for xous-names 2021-03-30 02:13:23 +08:00
bunnie
f35d478cf0 attempt to refactor xous_names 2021-03-29 04:35:11 +08:00
bunnie
e889765caf refactor the Ticktimer API. 2021-03-28 18:14:41 +08:00
Sean Cross
fdce58d06e ipc: convert project to use xous-ipc
This rewrites the entire project so that most runnable projects now use
`xous-ipc` instead of `xous::String` where possible.

This also removes `rkyv` from the list of dependencies in `xous-rs`.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-26 20:22:33 +08:00
Sean Cross
52c993556f services: gam: use create_thread_4
This replaces create_thread_simple() which is unsound and has been
deprecated.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-25 13:15:42 +08:00
bunnie
ca07645dce remove loop polling on GAM, seems unecessary 2021-03-18 16:21:10 +08:00
bunnie
ea8b208a15 finalize rkyv 0.4.1 refactor 2021-03-18 03:54:48 +08:00
bunnie
f9439b48d6 checking in a refactor that we're going to abort 2021-03-16 12:27:29 +08:00
bunnie
d68e3e8cf4 an attempt to refactor to rkyv 0.4.1
unfortunately, it looks like deserialize requires an alloc??
2021-03-16 02:02:53 +08:00
Sean Cross
14c9d62046 gam: make sure opcodes are only available in-crate
This prevents them from accidentally being used outside of the crate.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-13 18:05:33 +08:00
bunnie
d2ef03b7e2 intermediate commit to try and lock in a bug 2021-03-11 22:32:05 +08:00
bunnie
e84845553e Merge branch 'hardware' of github.com:betrusted-io/xous-core into hardware 2021-03-11 18:53:53 +08:00
bunnie
443e4a1444 remove draw_order from TextView
We can't support this anyways, because the textviews are
immediately drawn on call by the calling app
2021-03-11 18:52:10 +08:00
bunnie
d24a8a67b5
Update README.md 2021-03-11 18:49:30 +08:00
bunnie
b8dfa1ddcb
Update README.md 2021-03-11 18:28:38 +08:00
bunnie
54cf95aec1 turn off more debugging for demo 2021-03-11 04:43:58 +08:00
bunnie
0f0ab91879 fix margin on uptime 2021-03-11 04:09:12 +08:00
bunnie
835bee2c75 lay in foundations to support the sleep function 2021-03-11 01:45:54 +08:00
bunnie
a9a7ac435f add support for rounded rectangle text bubbles and dynamic sizing
this makes more more natural chat-style text bubble interactions
2021-03-10 00:25:14 +08:00
bunnie
d54b815653 add input listeners to get input lines.
next up: shellchat
2021-03-09 03:08:34 +08:00
bunnie
71e45c4bf8 refactor redraw to be on-demand
seems to make the performance much better
2021-03-09 02:32:36 +08:00
bunnie
7d1fb5a31b ellipsis support and fixing prediction redraw bugs 2021-03-09 02:24:45 +08:00
bunnie
8a8c1e6a66 foundations for predictive text display 2021-03-08 00:57:50 +08:00
bunnie
33df36f841 make input text preview area grow dynamically as text gets too long 2021-03-07 18:58:48 +08:00
bunnie
cb0686803e split out the background clear/redraw from the core loop 2021-03-06 02:45:47 +08:00
bunnie
00ada3ac3c clean up a debug message 2021-03-06 01:12:24 +08:00
bunnie
0cc1f9f5fb it doesn't look that impressive, but there's a lot of plumbing now. 2021-03-06 01:10:18 +08:00
bunnie
5ea2a21d2d tighten up APIs, implement a very 0th-order input loop
this is where the debugging begins of the beginning of
the API. it's like finally finding the start of a roll
of clear tape.
2021-03-04 19:02:56 +08:00
bunnie
aa8c0e5792 a bit more deck shuffling on the APIs
feels a lot cleaner now.
2021-03-04 16:02:42 +08:00
bunnie
92ca22c38c refactor IME plugin API into a common crate
This will allow other APIs to just include the API crate
to define all the gazintas and gozoutas.
2021-03-04 03:14:26 +08:00
bunnie
2b768e9b86 fix warnings in initial API 2021-03-03 23:27:30 +08:00
bunnie
313f12acbb clean up warnings 2021-03-03 22:38:20 +08:00
bunnie
8f809c2a51 start layering in the IME front end and prediction APIs 2021-03-03 14:53:33 +08:00
bunnie
9804290854 add some primers to the status loop
this helps the screen-up time appear faster, so we aren't
waiting for a full poll interval for new data to appear before
the system apears to be powered on
2021-03-02 21:57:52 +08:00
bunnie
9a2bce24cb clean up timing and cosmetic issues on status updates 2021-03-02 21:47:23 +08:00
bunnie
4b0f50293f another intermediate commit 2021-03-02 21:15:40 +08:00
bunnie
96a19baa8d state before refactor of status to own process 2021-03-02 19:25:41 +08:00
bunnie
d1609d2a31 another commit checkpoint. somehow, i have a race condition now. 2021-03-01 15:08:08 +08:00
bunnie
70aa5b792b check in for inspection 2021-03-01 14:40:39 +08:00
bunnie
5917ff4664 add object drawing to the GAM abstraction layer 2021-03-01 04:01:33 +08:00
bunnie
ce59bea2fa add function to extract canvas dimensions from GAM
gfx_conn should be exclusive from GAM to gfx_conn, so
need to refactor out all the errant calls that are
scattered about.
2021-03-01 02:33:13 +08:00
bunnie
bee1f796ee add rounded rectangle drawing 2021-03-01 01:49:22 +08:00
bunnie
463e2ad77d fixup GAM APIs to latest rkyv standard, fix drawable computation 2021-02-26 03:37:48 +08:00
bunnie
6528bc77d4 refactor GAM to use rkyv 2021-02-19 04:02:29 +08:00
bunnie
c5e6391e22 remove mention of Sendable and the ipc.rs module 2021-02-18 02:01:11 +08:00
bunnie
07b3dd9afa add PID printout to every service as it starts 2021-02-15 19:16:21 +08:00
bunnie
cc6992c3df implement "imports" methodology
This commit simplifies managing git-repo hosted dependencies, so
there is a single location for changing the package path.
2021-01-20 16:22:38 +08:00
bunnie
9252455795 fix Gid passing issue to status thread 2021-01-20 14:57:40 +08:00
bunnie
53713baaa6 trying to debug why lend_mut() isn't working 2021-01-20 03:18:13 +08:00
bunnie
f247e557e8 now to the point of testing the general message flow in hosted mode 2021-01-19 18:58:57 +08:00
bunnie
086a4da862 refactor TextView into graphics-server 2021-01-19 04:54:54 +08:00
bunnie
b72d2f2bb3 refactoring of interfaces 2021-01-19 00:05:33 +08:00
bunnie
73286828c8 more GAM API fleshing out; now to the point of updating a TextView 2021-01-18 04:12:40 +08:00
bunnie
01abbd4f47 more GAM API coming together 2021-01-17 21:58:02 +08:00
bunnie
5701bf4968 add debug attributes back in 2021-01-17 17:02:40 +08:00
bunnie
cc66c3911a starting to lay out initial framework for the graphical abstraction manager (GAM) 2021-01-17 04:02:08 +08:00