Commit graph

108 commits

Author SHA1 Message Date
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
55197e97f4 fix white space 2022-04-22 15:56:11 +08:00
bunnie
2c3143f790 Merge branch 'main' into multi-text-modals 2022-04-22 15:54:18 +08:00
Gianguido Sorà
c2e619949c status: use new multi-text modals to take time 2022-04-13 15:50:07 +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
Gianguido Sorà
8123393a7d Merge branch 'main' into feature/multi-text-modals 2022-04-07 16:39:03 +02:00
bunnie
c36d0d4111 remove an unnecessary xns registration 2022-04-07 00:20:07 +08:00
bunnie
33d8275321 refactor I2C to use deferred message responses instead of busy waits
This is a start on issue #111, where instead of starting a throw-away
server and doing a "yield" loop to emulate blocking behavior, messages
are instead stored so they don't drop, thus keeping a blocking
message blocking.
2022-04-06 03:35:43 +08:00
Gianguido Sorà
5c975fdee4 make single-field modals accept a placeholder 2022-04-05 16:28:58 +02:00
bunnie
5b8e53aacb remove "log" feature from NTP crate, trims off some executable size 2022-04-05 13:32:23 +08:00
bunnie
532c4a4f1f add NTP to time setting via SNTP library 2022-04-05 04:19:53 +08:00
bunnie
cfcea2e094 shift the status bar a bit more
as uptime goes up, the width gets larger...
2022-04-04 04:54:37 +08:00
bunnie
ba18f3cbe2 don't try to reset the RTC alarm in hosted mode
there isn't an RTC in hosted mode!
2022-03-30 23:33:00 +08:00
bunnie
d8065b76df turn off RTC wakeup alarms
This call was originally part of the RTC driver, but when we
refactored things out, this was forgotten.

So, what would happen is, if you did a coldboot or reboot,
an alarm would get set and...well, the way the RTC blocks
is it'll keep asserting the alarm until you clear it.

This prevents the system from sleeping, and also keeps
the CPU pegged at 100% for some reason. The prevention
from sleeping makes sense to me. The CPU at 100% probably
indicates there's a problem in the event router, but
this path isn't used for anything at the moment so
we'll just open an issue and leave it as technical debt.
2022-03-30 02:27:14 +08:00
bunnie
c8382a671a move the CPU status bar slightly to address text overflow issues 2022-03-29 16:54:27 +08:00
bunnie
2da52a1d5c fix millis vs seconds bug in hosted mode 2022-03-28 15:39:42 +08:00
bunnie
bd78ba94f1 refactor time setting modals into a separate thread
modals don't work when triggered in the status thread in hosted
mode (but they do, somehow, on real hardware). I think this
is an actual locking problem that would exhibit itself if
we had a true multiprocessor system, but since real hardware
is a single processor it doesn't show.
2022-03-28 15:25:43 +08:00
bunnie
c69b9e451d unbreak hosted mode 2022-03-28 04:04:38 +08:00
bunnie
c78273f540 refactor time setting to make a little more sense
now you set time in local time. If time zone hasn't been set already,
it'll prompt you to enter a time zone.

The main oddity is now that you have to know your time zone as
an offset from UTC. This can be fixed later with a proper symbolic
TZ to numeric mapping, but, that's actually a surprisingly hard
feature to implement.
2022-03-28 03:37:27 +08:00
bunnie
ed8f4d71cf fix suspend/resume issue with RTC (forgot to mask out bits on control register) 2022-03-28 01:19:02 +08:00
bunnie
a7912b6296 fix a swap on pub/priv server to susres 2022-03-27 17:08:04 +08:00
bunnie
ee4511c35d rework menu items and ordering
init for RTC shouldn't appear until keys are initialized and
PDDB has been mounted.
2022-03-27 16:45:22 +08:00
bunnie
340cd89661 update status to use the new RTC functions for time
Time is replaced with error messages that indicate either time has not
been set ("Set Time"), or the PDDB has not been mounted (it says
"Login?"), if there is an error. otherwise it displays time
in the local timezone.

Time setting is kind of awful in that you have to enter the time
as UTC. And then a timezone as an offset in hours from UTC. It's
very bare-iron.
2022-03-27 04:06:42 +08:00
bunnie
96f0a0d2ea add the actual thread to the code base and clean up some warnings.
Next up:
 - code up libstd glue
 - code up test cases
2022-03-26 02:42:42 +08:00
bunnie
b59e2ae2bf add reference to the time server.
We still need to *start* the thread, ya know...
2022-03-26 02:37:30 +08:00
bunnie
86ab8c392d add libstd time handler glue stubs 2022-03-26 02:34:38 +08:00
bunnie
bfb8a17cd5 strip out legacy RTC calls in preparation for refactor 2022-03-24 02:19:26 +08:00
bunnie
b1f8c1ea1b add power-on indicator for tts mode 2022-03-17 18:41:12 +08:00
bunnie
19b9b817a4 add a battery disconnect option to the main menu
this will disconnect the battery and put the device in a very low power
state, and you can only power it back on again by plugging it into
a power source briefly.
2022-03-17 03:37:34 +08:00
bunnie
3f6c2a6a5f fix a misplaced comment 2022-03-11 21:26:48 +08:00
bunnie
bbccf1c2a7 reached a reasonable integration point for tts until braille protos are in
tts is working fairly well and much more stably, menus and ui
elements are wired up for tts.

just waiting for the latest braille keyboard pcb to come in and
then we'll be able to fire off some prototypes...
2022-03-11 19:08:39 +08:00
bunnie
c44f794dfe baseline before moving onto the next stage 2022-03-11 00:03:31 +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
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
a9a5e5c9a9 integrate app name in sec notes patch, make app name update retriggered on change 2022-02-24 19:44:24 +08:00
Gianguido Sorà
b47c7b2793 Add current app name in security notes
This commit adds the current's app name to the security bar at the top
of the screen, just beneath the status bar.
I had to add a new generated function to map app index back to its name,
along with an enum to signal whether or not the id is valid.

Signed-off-by: Gianguido Sorà <me@gsora.xyz>
2022-02-24 19:29:45 +08:00
bunnie
764b4be6b1 clean up status line overrun if text fitting went errant 2022-02-21 00:03:28 +08:00
bunnie
8dd991b534 reduce debug spew 2022-02-15 22:25:07 +08:00
bunnie
c86df3d095 fix logic bug in usb lock status update 2022-02-06 01:31:08 +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
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
a4752dbb59 app manifest and auto-gen infrastructure 2022-02-02 16:18:06 +08:00
bunnie
05df4486ee incremental changes toward a manifest-format app system 2022-02-02 03:57:00 +08:00
bunnie
925d53f646 TCP listener is "working"
Good enough so that if you type `net server` and you hit the IP
address of the device, it'll respond with something like

Hello from Precursor!
I have been up for 86087 ms.

There's still all kinds of bugs, I'm sure. But ... I'm also not
sure /why/ you would want a web server on Precursor. This is more
just to make sure that the TCP stack isn't totally broken.

The "web server" as it may be is quite broken and doesn't parse
any headers and probably sends a bogus amount of data because
I can't figure out if the content length includes some new lines
or not. But really, this just isn't in scope. Works with Chrome,
Firefox shows the status page and then says "connection reset" and hides
all the information. Whatever, browser compatibility is well beyond
my pay grade!
2022-02-01 18:54:07 +08:00
bunnie
944a1b1672 fix format specifier 2022-02-01 01:20:23 +08:00
bunnie
7c93b16c13 minor tweaks
The japanese phrase for "disconnected" is very long and doesn't
fit in the allocated space :-/ something to think about in the future.
2022-02-01 01:19:31 +08:00
bunnie
5c91645ede Merge branch 'i18n-jp' into bunnie-dev 2022-02-01 01:04:43 +08:00
bunnie
4690075c40 clean build, but...much testing to do. 2022-01-31 04:03:31 +08:00