refactor: IWDG driver and EM trigger (#3846)
This commit is contained in:
@@ -59,6 +59,22 @@
|
||||
#define CLOCK_X 53
|
||||
#define CLOCK_Y 57
|
||||
|
||||
#if defined(ASTERISK) || !defined(USE_WATCHDOG) || defined(LOG_TELEMETRY) || \
|
||||
defined(LOG_BLUETOOTH) || defined(DEBUG_LATENCY)
|
||||
|
||||
static bool isAsteriskDisplayed() {
|
||||
return true;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include "hal/abnormal_reboot.h"
|
||||
|
||||
static bool isAsteriskDisplayed() {
|
||||
return UNEXPECTED_SHUTDOWN();
|
||||
}
|
||||
#endif
|
||||
|
||||
void drawExternalAntennaAndRSSI()
|
||||
{
|
||||
#if defined(INTERNAL_MODULE_PXX1) && defined(EXTERNAL_ANTENNA)
|
||||
|
||||
@@ -76,6 +76,22 @@ const unsigned char icons[] = {
|
||||
#define ICON_REBOOT 91, 11
|
||||
#define ICON_ALTITUDE 102, 9
|
||||
|
||||
#if defined(ASTERISK) || !defined(USE_WATCHDOG) || defined(LOG_TELEMETRY) || \
|
||||
defined(LOG_BLUETOOTH) || defined(DEBUG_LATENCY)
|
||||
|
||||
static bool isAsteriskDisplayed() {
|
||||
return true;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include "hal/abnormal_reboot.h"
|
||||
|
||||
static bool isAsteriskDisplayed() {
|
||||
return UNEXPECTED_SHUTDOWN();
|
||||
}
|
||||
#endif
|
||||
|
||||
void doMainScreenGraphics()
|
||||
{
|
||||
int16_t calibStickVert = calibratedAnalogs[ADC_MAIN_LV];
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "libopenui.h"
|
||||
#include "theme.h"
|
||||
|
||||
#include "watchdog_driver.h"
|
||||
#include "hal/watchdog_driver.h"
|
||||
|
||||
coord_t drawStringWithIndex(BitmapBuffer * dc, coord_t x, coord_t y, const char * str, int idx, LcdFlags flags, const char * prefix, const char * suffix)
|
||||
{
|
||||
@@ -185,7 +185,7 @@ void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration,
|
||||
|
||||
void drawFatalErrorScreen(const char * message)
|
||||
{
|
||||
backlightEnable(100);
|
||||
backlightEnable(BACKLIGHT_LEVEL_MAX);
|
||||
lcdInitDirectDrawing();
|
||||
lcd->clear(COLOR2FLAGS(BLACK));
|
||||
lcd->drawText(LCD_W/2, LCD_H/2-20, message, FONT(XL)|CENTERED|COLOR2FLAGS(WHITE));
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "libopenui.h"
|
||||
#include "theme.h"
|
||||
|
||||
#include "watchdog_driver.h"
|
||||
#include "hal/watchdog_driver.h"
|
||||
|
||||
#if LCD_W > LCD_H
|
||||
constexpr uint32_t ALERT_FRAME_TOP = 50;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "libopenui.h"
|
||||
#include "pwr.h"
|
||||
|
||||
#include "watchdog_driver.h"
|
||||
#include "hal/watchdog_driver.h"
|
||||
|
||||
static void _run_popup_dialog(const char* title, const char* msg,
|
||||
const char* info = nullptr)
|
||||
|
||||
@@ -23,10 +23,9 @@
|
||||
#include "inactivity_timer.h"
|
||||
#include "stamp.h"
|
||||
|
||||
extern void checkSpeakerVolume();
|
||||
#include "hal/abnormal_reboot.h"
|
||||
|
||||
#include "opentx.h"
|
||||
#include "stamp.h"
|
||||
extern void checkSpeakerVolume();
|
||||
|
||||
#if defined(VERSION_TAG)
|
||||
const std::string ver_str = "" VERSION_TAG;
|
||||
|
||||
Reference in New Issue
Block a user