Commit graph

519 commits

Author SHA1 Message Date
Tom Marble
006a69105c
Completes the i18n_helper.py tool
Added 'fr' translation
Added *.json to .gitattributes

Signed-off-by: Tom Marble <tmarble@info9.net>
2022-10-27 16:07:05 -05:00
Gianguido Sorà
a7b950684f Merge branch 'main' into feat/user-preferences 2022-10-27 15:34:05 +02:00
Gianguido Sorà
e11bef1eff chore: create Preferences menu GAM entry and l18n 2022-10-27 14:55:56 +02:00
bunnie
475e464efe bump versions due to svd2utra change 2022-10-27 03:04:22 +08:00
bunnie
0ee9ec1d80 bump version numbers for crate publication 2022-10-25 22:38:58 +08:00
Jean-Pierre De Jesus DIAZ
f5176ea380
Remove xous-rs unused features
The rationale is that xous-rs should have only architecture
specific code, e.g.: riscv, arm, x86, etc. To make other
crates that depend on it not specify the features.

This could be useful when using xous-rs with `libstd`
for example.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2022-10-25 13:29:15 +02:00
bunnie
d331d405ee bump version numbers for publication 2022-10-25 17:23:40 +08:00
bunnie
67fc21fbdd harmonize hosted mode selection, but retain an explicit hosted flag
In general, hosted mode is assumed "by default" if the target
is not Xous. This allows packages to be built cleanly on command
lines that don't know to pass a --feature flag to specify a target.

However, an explicit "hosted" flag is still retained so that we
can confirm the build system intent. This saves us from the failure
mode that we thought we were building for target A, but accidentally
ommitted the flag, and instead we've been silently building for
"hosted" mode without any warning. The main consumer of the "hosted"
flag is now just the build.rs script inside of the utralib.
2022-10-25 17:21:02 +08:00
bunnie
805a7d528c flip back to using remote references 2022-10-20 16:30:06 +08:00
bunnie
8e05925cfa somehow the transition to local paths got missed in the merge 2022-10-18 00:39:01 +08:00
bunnie
0584ad2f2c switch to local paths to see if this helps the build 2022-10-18 00:26:56 +08:00
bunnie
4d1da235a9 bump revs that depend on susres to absorb changes 2022-10-17 05:11:09 +08:00
bunnie
4b368d71db bump versions of crates 2022-10-15 01:31:54 +08:00
bunnie
63a87ca1bc bump all the versions 2022-10-14 16:54:43 +08:00
bunnie
ff30131f43 absorb more fixes into the kernel 2022-10-13 04:08:56 +08:00
bunnie
51752aac9d
Merge pull request #239 from Foundation-Devices/baremetal
Use CARGO_CFG_TARGET_OS in build scripts.
2022-10-12 12:56:17 -07:00
bunnie
3503965f98 bump versions to absorb xous-rs changes 2022-10-13 03:41:16 +08:00
Jean-Pierre De Jesus DIAZ
955fbc8788
xous: Use CARGO_CFG_TARGET_OS in build scripts.
This allows for a more reliable detection of target_os configuration
in build scripts. The target is inconsistent between some architectures,
notably armv7a is `armv7a-none-eabi` skipping the `unknown` (the vendor,
I guess) part. This happen with some of the unrelated Cortex-M targets
present, and others may also be.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2022-10-12 19:03:46 +02:00
bunnie
f8a2ea51bb remove rkyv warnings from xous-api-names 2022-10-10 03:16:40 +08:00
bunnie
02b80425f5 bump xous-rs to absorb change in language specification 2022-10-10 03:07:44 +08:00
bunnie
f815ed85b5 fix rust 1.64.0 rkyv warning regressions on unused enum types
rkyv-derived enums throw warnings that they are unused.
Not sure how to get rid of them; I've tried surrounding them in
`#[allow(dead_code)]` directives, and also explicitly creating
each enum variant that I'm aware of through some dummy code and
some log prints of the dummy code calls to ensure the results are
used, and the warnings still persist.

Significantly, the warnings only happen for enums that take
a value. Simple rkyv enums do not throw a warning.

These warnings overwhelm the build logs, so they need to be isolated
in order for us to ensure that the build is clean of other more
important warnings.

The method chosen to isolate them is to take the enums that are
problematic, carve them into their own special file, and add
a file-wide `#![allow(dead_code)]` directive. This only happens
in 7 service crates, and this change commits all of the modifications
in a single big commit that could be undone later if this turns out
to be a compiler regression or something similar.

I also opened an issue with the rkyv maintainer to see what his
opinion is on the situation.

https://github.com/rkyv/rkyv/issues/318
2022-10-09 17:17:20 +08:00
bunnie
3bca9de2a0 bump version numbers for xous-kernel patch
this fixes tests in CI
2022-10-05 23:51:35 +08:00
bunnie
969f93b001 cross-repo update versions from xous-rs bump 2022-10-05 18:32:44 +08:00
bunnie
9dcc0a3386 absorb ticktimer api bump, propagated from susres bump 2022-10-03 04:40:06 +08:00
bunnie
d2b2383d1a bump susres version 2022-10-03 04:36:32 +08:00
bunnie
b184bfbe6a move ticktimer to remote api 2022-10-03 03:37:38 +08:00
bunnie
89ca75c4bf move over to remote susres api 2022-10-03 02:24:44 +08:00
bunnie
6123e8ff9b xous-names conversion to crates.io 2022-10-03 01:18:20 +08:00
bunnie
de514ac66f rename packages in prep for upload to crates.io 2022-10-03 00:24:45 +08:00
bunnie
4e40ae6c5d move from target selectors to feature selectors for back-ends
This will allow for e.g. xous on riscv32-imac but not a precursor
target, for example: by using feature selectors we get to have
a bigger range of targets that we support, such as for implementations
that haven't been upstreamed or have official target-triples.

The downsides are:

- patch override libraries don't absorb feature flags. so, for
example, the AES crate that is used to patch other crates won't
be aware of the target features without modifying the referencing
crates.

- features are normally meant to be additive, but target features
are mutually exclusive. The mutex is enforced by a check in
utralib that throws a panic on build if two targets are accidentally
selected at the same time.
2022-10-02 02:56:44 +08:00
bunnie
fb29c9b2c1 refactor utra target line to use explicit feature targets
still need to rework the crate feature selection
2022-10-02 02:20:03 +08:00
bunnie
ecab0ba045 fix default-features in services 2022-09-27 02:44:46 +08:00
bunnie
d667d7e1f5 bump xous-ipc version 2022-09-27 01:14:43 +08:00
bunnie
f188e0f866 re-bump xous-ipc to 0.9.9 2022-09-26 16:50:38 +08:00
bunnie
507ab42836 downgrade xous-ipc to 0.9.7 until i have permissions to push a new version 2022-09-26 16:11:26 +08:00
bunnie
3579dfdd17 update xous-ipc and xous versions 2022-09-26 16:07:35 +08:00
bunnie
114d60bc53 migrate logserver API to external package 2022-09-26 14:06:46 +08:00
Gianguido Sorà
f63d69debc Merge branch 'main' into gsora/wlan-manager 2022-09-12 13:04:38 +02:00
nworbnhoj
d96faec4eb add png_decode comments 2022-08-09 06:18:49 +10:00
nworbnhoj
76bb796610 bugfix distortion in png_decode
png filter specification calls for initial prior_line = [0u8]
see: https://www.w3.org/TR/PNG/#9Filters
but [0u8] results in distortion ???????
so use [125u8]
2022-08-08 07:39:49 +10:00
nworbnhoj
155373bfa0 ignore png_decode chunk checksums
The checksum calc is inner-loop so removed for performance gain.

If a hacker can manipulate a byte then then they can manipulate a RGB
byte or a checksum byte - so the checksum doesn't really give any
protection from hacking afaik. I presume the checksum is in there to
detect corruption during storage or transmission - but if a couple of
bytes are corrupted you will not notice the change in the image - and
if a lot of bytes are corrupted then the distortion in the image will be
obvious. This is even more the case in Precursor, where we are shrinking
and dithering the image as a matter of course. So I don't really see the
point of the checkum
2022-08-08 05:47:45 +10:00
nworbnhoj
4ddcabc657 Merge branch 'main' into iter 2022-08-07 05:36:40 +10:00
nworbnhoj
9b7c63c719 Box miniz_oxide InflateState 2022-07-29 06:13:20 +10:00
nworbnhoj
27ac3d9dc1 fix image modal center 2022-07-28 18:57:23 +10:00
nworbnhoj
7af94e674d fix Bitmap::from_png rotate 2022-07-28 07:53:52 +10:00
nworbnhoj
f9ee19e526 fix merge blunder
caused by flakey Internet connection
2022-07-28 07:36:01 +10:00
nworbnhoj
1923a9ccf4 Merge branch 'iter' of github.com:nworbnhoj/xous-core into iter 2022-07-28 06:26:16 +10:00
nworbnhoj
f95a49dfdc rename DecodePng INFLATED_BUFFER_LENGTH 2022-07-28 06:16:48 +10:00
nworbnhoj
7626be7043 rustfmt Bitmap 2022-07-28 06:07:35 +10:00
nworbnhoj
afef00a028 breakout mod Img RGB raster 2022-07-28 06:06:16 +10:00
nworbnhoj
98586ffc6c breakout mod GreyScale adaptor iterator 2022-07-28 05:58:31 +10:00
nworbnhoj
2d0ddc3450 breakout mod Shrink adaptor iterator 2022-07-28 05:53:16 +10:00
nworbnhoj
64f6ddeade breakout mod Dither adaptor iterator 2022-07-28 05:51:07 +10:00
nworbnhoj
938788d72f breakout mod Dither adaptor iterator 2022-07-28 05:45:34 +10:00
nworbnhoj
dadaae2884 mark color_types palette as unsupported in Bitmap::from_png 2022-07-28 05:25:05 +10:00
nworbnhoj
118f0c0346 extend color_types & bit_depths in GreyScale adaptor iterator 2022-07-28 05:21:20 +10:00
nworbnhoj
7cd5ee82ce Implement decode_png adaptor iterator
This incomplete PNG decoder presents as an Iterator reading u8 bytes directly from a Reader.

Aproaching a png decoder as an Iterator requires significantly less Heap than
the traditional batch aproach.

On Precursor, this enables PNG bytes to be intercepted at the network interface
and processed into the much smaller gam::Bitmap format without ever having to
store the original PNG file.
2022-07-27 09:18:19 +10:00
bunnie
5e9e078f8a remove debug info that can leak password data 2022-07-19 04:38:46 +08:00
bunnie
9569954ab4 add an extra line to the bip-39 display area
turns out you can have 5-line codes.
2022-07-13 04:37:14 +08:00
bunnie
6fc83d363b resolve issue #202 add a bail option to the BIP39 dialog 2022-07-07 00:46:58 +08:00
bunnie
4087312a2c add bip39 primitives to the GAM, including an interactive entry dialog 2022-07-06 04:52:14 +08:00
bunnie
148bf71a94 modify the fb pop routine so it doesn't overwrite the status bar
this eliminates a small glitch in the time display/security infos
whenever transitioning between foreground/background contexts
2022-07-05 03:24:15 +08:00
bunnie
32a3bb5fa4 change foreground/background behavior
1. add foreground/background tracking, such that if we return
to a context instead of redrawing it, we stash the framebuffer and
restore it.

2. make foreground/background context swap messages mandatory

previously, we were "light fingered" about sending the message --
we'd only send them to apps. the app was not considered to be
"backgrounded" if a menu came up in front of it.

This turns out to be a mistake. Now, we background apps when
a menu or dialog comes in front of it, and then foreground it when
the app goes away.
2022-07-05 02:43:40 +08:00
bunnie
0fc13100b1 make redraws non-catastrophic if the server queue is full 2022-07-01 17:09:33 +08:00
nworbnhoj
e7d5c11cbc
Merge branch 'main' into iter 2022-06-29 10:54:06 +10:00
nworbnhoj
247dfd2fe7 simplify gam bitmap img struct 2022-06-29 07:33:37 +10:00
nworbnhoj
29925a5caa implement Dither adaptor iterator 2022-06-28 07:31:18 +10:00
Sean Cross
748d4ce87d Merge remote-tracking branch 'origin/main' into libstd-fs 2022-06-27 09:14:04 +08:00
bunnie
e2b550f34d
Merge pull request #193 from nworbnhoj/main
reduce memory footprint of Dither::dither()
2022-06-27 04:06:34 +08:00
Sean Cross
5639bb81ce gam: define opcode numbers for opcodes
Signed-off-by: Sean Cross <sean@xobs.io>
2022-06-26 16:45:18 +08:00
bunnie
e2f335ec3a make missed input forwarding non-fatal 2022-06-23 02:26:02 +08:00
bunnie
0624dee629 fix default entry population on multiple fields 2022-06-23 01:27:24 +08:00
bunnie
44b15c7262 modify text entry behavior to recover default
if the field is empty and you're not in password mode,
pressing left or right will populate the autocomplete field
2022-06-22 21:41:07 +08:00
nworbnhoj
549178e148 implement Shrink adaptor iterator 2022-06-22 21:30:20 +10:00
bunnie
7e65f3db66 add a breadcrumb 2022-06-22 18:16:28 +08:00
bunnie
5e450235e3 improve debug output for raise/lower; add a nonblocking relinquish 2022-06-22 18:14:00 +08:00
bunnie
e33c7b9ecc add raise/lower debug info 2022-06-22 18:12:04 +08:00
bunnie
f041dfb9b4 fix warning message on nonblocking redraw 2022-06-22 18:11:23 +08:00
bunnie
b777714435 modify textentry behavior: default text changes
at the moment, default text will always come back if you
remove the text so there is no text in the field (for example,
you start typing, and then you decide you want to start over,
the suggested text re-appears).

this change makes it so that once you start typing, the suggested
text does not return. Furthermore, it counts the initial backspace
as a key that's hit, so you can clear the suggested text by just
hitting backspace.
2022-06-22 04:42:05 +08:00
nworbnhoj
0f971fcc33 implement 3xU8 RGB to U8 Greyscale adapter iterator 2022-06-20 08:03:03 +10:00
bunnie
5f4678ca6a fix concurrency issue in predictor/redraw loop
So there's a bit of a nasty bug that arises from the GAM
both handling drawing primitives and context swaps.

In particular, because the GAM handles both of these in a
single thread, context swaps can't block, because the redraws
triggered by the context swap would be blocked, causing a deadlock.

When the API token for the predictor was introduced, this added
a blocking operation inside the context swap. This would cause
a deadlock under certain conditions.

This patch refactors the API token so that it's not a return
result of swapping the predictors. Instead, the predictors
return the API token as a non-blocking message to the GAM. This
API token is correlated with the *GAM* token (not the app token).
Present me thanks past me for adding the GAM token, which was
as of yet unused, but now, there is a very sensible role for it--
exactly what it was made for, e.g. handling GAM-local API calls
without disclosing the application token.

Anyways, hopefully this patch puts the race condition to
rest, while allowing us to have per-context prediction histories.
2022-06-20 03:05:16 +08:00
bunnie
78ea80f809 remove main() thread-wrapping for non-ditherpunk configs
saves a bit of memory
2022-06-19 21:39:29 +08:00
bunnie
9acab60018 strip out some debug statements 2022-06-19 01:56:58 +08:00
bunnie
b7453b627e add API tokens to prediction API
The prediction API now takes an API token. This is a 128-bit
number that gets passed to the prediction engine, and it's meant
to be unique for every context that requires a predictor.

It's up to the prediction engine to do anything with the token.
For the "null" engines (such as the icontray for `vault` and
`tts`) the token is just ignored. But for example, in `shellchat`,
the API token is used to store a history record in a HashMap on
a per-token basis. This means that every app that uses the
`shellchat` history function gets their own history that can only
be read out by that app.

The actual token itself is mostly passed through the API. The
token storage is in the Context layer (each Context has a record
for a token, that starts as `None`), and is passed down to
the predictor every time the context swaps, and the predictor
receives the token and passes it back if the token was `Some`,
or allocates a new random token if it was `None`.

Note that everything is a Context, including, for example, menus and
modal dialog boxes, but not all contexts have predictors. Only
Contexts that ask for a predictor have them. This mechanism
works smoothly in this model (as opposed to other hacks and work-arounds
previously tried getting to this solution).
2022-06-19 01:01:25 +08:00
nworbnhoj
5c48439a66 reduce memory footprint of Dither::dither() 2022-06-18 21:02:21 +10:00
nworbnhoj
2dbdb10704 remove dependency on fast-image-resize crate 2022-06-18 12:07:58 +10:00
nworbnhoj
e9224cf4ae Merge branch 'main' of github.com:nworbnhoj/xous-core into main 2022-06-18 08:47:40 +10:00
nworbnhoj
409f696fde Implement gam::PixelType
enables gam::Img to import different image formats: U8 & U8x3 for now
2022-06-18 08:43:32 +10:00
nworbnhoj
9b8c4e063f
Merge branch 'betrusted-io:main' into main 2022-06-18 07:10:33 +10:00
nworbnhoj
f7e216bb25 convert RGB image immediately to greyscale on import
code simplification/reduction, and memory/processing saving
2022-06-18 07:07:15 +10:00
bunnie
1e266b3389 adjust image modal size to match the target size for image centering 2022-06-17 22:01:07 +08:00
bunnie
d829839c28
Merge pull request #190 from nworbnhoj/main
fix gam::Tile render RHS
2022-06-17 21:40:28 +08:00
nworbnhoj
d33d7958f2 Merge branch 'main' of github.com:nworbnhoj/xous-core into main 2022-06-17 23:08:37 +10:00
nworbnhoj
148e0fdd99 remove unnecessary Img clone 2022-06-17 23:06:39 +10:00
bunnie
6e0d025dea add "menu mode" option to the IMEF
in "menu mode" the predictive area functions as four menu
option keys instead of dynamic prediction updates.

this patch is mostly working but we need to figure out how to
force a redraw of the predction area when the app is raised,
because we get a stale image from the previous app on context
switch.
2022-06-17 12:40:44 +08:00
bunnie
cf89ebe5f5 add wrapper around main functions that need bigger stacks
This allows for `ditherpunk` config to have a much larger
stack size on select processes only.

The cost comes at a 4k fixed overhead for the sacrificial
wrapper thread, so we lose about 20k of runtime RAM, even
when ditherpunk is *not* activated (because we're
always wrapping the threads).

There is no impact on scheduling or CPU utilization, as the
wrapper thread blocks and is never scheduled once the real
main starts. However, it does subtract one thread from the
total available thread pool.
2022-06-16 03:40:19 +08:00
bunnie
d39c319c05 recode GAM interface to send one tile at a time
Don't add Tiles to ObjectList because it greatly inflates
the amount of RAM required to sling tiles around
2022-06-15 01:32:12 +08:00
bunnie
1bd82b9ea4 try to debug why images aren't showing up 2022-06-14 19:06:33 +08:00
bunnie
fc8e5df2b1 Merge remote-tracking branch 'origin/dither2' into dp2-merge 2022-06-14 16:45:38 +08:00
nworbnhoj
6f2e2ed9bc fix very annoying error 2022-06-14 05:03:43 +10:00
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