mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2024-12-13 03:34:35 +00:00
Disable display scroll before showing fault debug message (#1482)
This commit is contained in:
parent
a1856b9bb0
commit
5cd7a09797
@ -57,6 +57,9 @@ uint32_t fault_address{0};
|
||||
void draw_guru_meditation_header(uint8_t source, const char* hint) {
|
||||
Painter painter;
|
||||
|
||||
// disable scroll in case a waterfall/spectrum display was active (scroll would mess up the fault display)
|
||||
portapack::display.scroll_disable();
|
||||
|
||||
painter.fill_rectangle(
|
||||
{0, 0, portapack::display.width(), portapack::display.height()},
|
||||
Color::red());
|
||||
@ -134,6 +137,10 @@ void runtime_error(uint8_t source) {
|
||||
|
||||
led.off();
|
||||
|
||||
// wait for DFU button release if pressed, so we don't immediately jump into stack dump
|
||||
while (swizzled_switches() & (1 << (int)Switch::Dfu))
|
||||
;
|
||||
|
||||
while (true) {
|
||||
volatile size_t n = 1000000U;
|
||||
while (n--)
|
||||
@ -243,10 +250,6 @@ void draw_stack_dump() {
|
||||
p = &__process_stack_base__;
|
||||
break;
|
||||
}
|
||||
|
||||
// If SEL button pressed, try writing to file (likely to hang in fault condition but heh)
|
||||
if (switches & (1 << (int)Switch::Sel))
|
||||
stack_dump();
|
||||
}
|
||||
|
||||
// clear screen to allow new range to be displayed, if we're not at the end
|
||||
|
Loading…
Reference in New Issue
Block a user