mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-22 22:41:10 -04:00
Disable display scroll before showing fault debug message (#1482)
This commit is contained in:
parent
a1856b9bb0
commit
5cd7a09797
1 changed files with 7 additions and 4 deletions
|
@ -57,6 +57,9 @@ uint32_t fault_address{0};
|
||||||
void draw_guru_meditation_header(uint8_t source, const char* hint) {
|
void draw_guru_meditation_header(uint8_t source, const char* hint) {
|
||||||
Painter painter;
|
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(
|
painter.fill_rectangle(
|
||||||
{0, 0, portapack::display.width(), portapack::display.height()},
|
{0, 0, portapack::display.width(), portapack::display.height()},
|
||||||
Color::red());
|
Color::red());
|
||||||
|
@ -134,6 +137,10 @@ void runtime_error(uint8_t source) {
|
||||||
|
|
||||||
led.off();
|
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) {
|
while (true) {
|
||||||
volatile size_t n = 1000000U;
|
volatile size_t n = 1000000U;
|
||||||
while (n--)
|
while (n--)
|
||||||
|
@ -243,10 +250,6 @@ void draw_stack_dump() {
|
||||||
p = &__process_stack_base__;
|
p = &__process_stack_base__;
|
||||||
break;
|
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
|
// clear screen to allow new range to be displayed, if we're not at the end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue