mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-20 03:47:45 +00:00
added delayed error message when hackrf cpld initialization fails (#1887)
* added delayed error message when hackrf cpld initialization fails * refactoring
This commit is contained in:
@@ -44,6 +44,8 @@ using namespace lpc43xx;
|
||||
|
||||
#include "ui_navigation.hpp"
|
||||
|
||||
static int delayed_error = 0;
|
||||
|
||||
extern "C" {
|
||||
|
||||
CH_IRQ_HANDLER(M4Core_IRQHandler) {
|
||||
@@ -161,6 +163,10 @@ void EventDispatcher::dispatch(const eventmask_t events) {
|
||||
}
|
||||
|
||||
if (events & EVT_MASK_RTC_TICK) {
|
||||
// delay error message by 2 seconds to wait for LCD being ready
|
||||
if (portapack::init_error != nullptr && ++delayed_error > 1)
|
||||
draw_guru_meditation(CORTEX_M4, portapack::init_error);
|
||||
|
||||
handle_rtc_tick();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user