Commit graph

128 commits

Author SHA1 Message Date
bunnie
5847cb04cf improve resume error handling in the time block 2022-07-13 15:16:15 +08:00
bunnie
b4b6fc2a49 unbreak hosted mode 2022-07-13 05:01:36 +08:00
bunnie
85ced42465 add automatic checks for backup/restore on boot 2022-07-13 04:44:44 +08:00
bunnie
941d72f3c5 add a magic word check to the wf200 routine
avoids running an update if nothing is staged at all.
2022-07-12 03:31:54 +08:00
bunnie
ed2f029874 add SoC autoupdate flow options -- still needs testing 2022-07-11 18:36:00 +08:00
bunnie
f756c4ee66 note stats on quitting the updater thread 2022-07-11 16:27:13 +08:00
bunnie
3e8065ee56 quit the ec updater thread once we're done checking for updates
unless we're debugging, there is no more need for its resources
to be allocated.
2022-07-11 16:23:36 +08:00
bunnie
24c10dcfb2 bump the rate of update feedback slightly
slightly more aesthetic experience without too much performance
penalty.
2022-07-11 15:09:47 +08:00
bunnie
a90b5f2554 clean up autoupdate flow & clean up net link reset flow
We are now at a point where the EC update can be applied and the
net stack recovers gracefully, so no reboot is required in the
case of an EC update.
2022-07-11 15:07:53 +08:00
bunnie
d639b3db55 fix debug output 2022-07-11 04:13:04 +08:00
bunnie
70003b641f migrate ecup to the status thread
also rework the boot flow to have auto-update detect for EC updates
2022-07-11 04:05:53 +08:00
bunnie
ead5bd7dac enable gateware updates when no root keys are present 2022-06-30 22:58:54 +08:00
bunnie
77baf89d5c have time server retry on I2C error 2022-06-28 03:25:14 +08:00
bunnie
a0217d9ffd debug logic and whitespace 2022-06-28 01:14:38 +08:00
bunnie
95b4df1923 fix regression on suspend/resume on time server
seems like we're putting too much demand on the I2C bus
on resume at the moment, backing off the requests a bit
helps ease the logjam.
2022-06-28 01:13:25 +08:00
bunnie
be7d8a76a5 catch potential div by 0 on status redraw 2022-06-27 18:45:02 +08:00
bunnie
ac3f6a06fb fix status bar (ran out of precision during the floating pt refactoring) 2022-06-27 04:25:18 +08:00
bunnie
9f409fda2d fix basis search order issues
at least, it passes some simple tests. much more testing is needed.
2022-06-26 03:52:27 +08:00
bunnie
b9e1e69adb update a commment so we know not to change a particular constant 2022-06-25 00:21:46 +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
82919637d8 remove TODO (@gsora confirmed everything is OK!) 2022-06-18 00:42:50 +08:00
bunnie
9eec4436ea some comment bookkeeping and whitespace cleanup 2022-06-18 00:17:35 +08:00
bunnie
6d2531804b
Merge pull request #191 from gsora/gsora/backlight-on-keypress
Automatic backlight on keypress
2022-06-17 23:55: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
8cb632180c fix fractional decimal places on integer conversions 2022-06-14 04:30:58 +08:00
bunnie
7b2fbdc88b evict f64's from the kernel, and eliminate f32 parsing
turns out these routines add quite a bit of bloat to the kernel
for only cosmetic reasons.
2022-06-14 04:14:25 +08:00
Gianguido Sorà
d7eb53664e chore: move automatic backlight in status crate
Let's not use a precious process just for some a backlight effect :-)
2022-06-13 16:33:44 +02:00
Gianguido Sorà
1ebf3316e7 feat: wire keyboard backlight controls to main menu 2022-06-10 17:14:38 +02:00
Gianguido Sorà
4115c9b2cd feat: wire keyboard-backlight to status menu 2022-06-10 14:33:33 +02:00
bunnie
9ee306315e fix warnings that result from the PDDB mutability change 2022-05-31 23:55:12 +08: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
62cbc86aeb add automation strings 2022-05-24 23:21:26 +08:00
bunnie
c7f9688b5f have status point to the USB crate for USB checkup 2022-05-17 02:25:44 +08: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
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
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