mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-14 20:58:36 -07:00
modified crash text for sfw_mode
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#include <furi_hal.h>
|
#include <furi_hal.h>
|
||||||
|
|
||||||
#include "../desktop_i.h"
|
#include "../desktop_i.h"
|
||||||
|
#include "../../../settings/desktop_settings/desktop_settings_app.h"
|
||||||
|
|
||||||
#define DesktopFaultEventExit 0x00FF00FF
|
#define DesktopFaultEventExit 0x00FF00FF
|
||||||
|
|
||||||
@@ -12,8 +13,21 @@ void desktop_scene_fault_callback(void* context) {
|
|||||||
void desktop_scene_fault_on_enter(void* context) {
|
void desktop_scene_fault_on_enter(void* context) {
|
||||||
Desktop* desktop = (Desktop*)context;
|
Desktop* desktop = (Desktop*)context;
|
||||||
|
|
||||||
|
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||||
|
DESKTOP_SETTINGS_LOAD(settings);
|
||||||
|
|
||||||
Popup* popup = desktop->hw_mismatch_popup;
|
Popup* popup = desktop->hw_mismatch_popup;
|
||||||
popup_set_context(popup, desktop);
|
popup_set_context(popup, desktop);
|
||||||
|
if (settings->sfw_mode) {
|
||||||
|
popup_set_header(
|
||||||
|
popup,
|
||||||
|
"Flipper crashed\n but has been rebooted",
|
||||||
|
60,
|
||||||
|
14 + STATUS_BAR_Y_SHIFT,
|
||||||
|
AlignCenter,
|
||||||
|
AlignCenter);
|
||||||
|
}
|
||||||
|
else {
|
||||||
popup_set_header(
|
popup_set_header(
|
||||||
popup,
|
popup,
|
||||||
"Slut passed out\n but is now back",
|
"Slut passed out\n but is now back",
|
||||||
@@ -21,11 +35,14 @@ void desktop_scene_fault_on_enter(void* context) {
|
|||||||
14 + STATUS_BAR_Y_SHIFT,
|
14 + STATUS_BAR_Y_SHIFT,
|
||||||
AlignCenter,
|
AlignCenter,
|
||||||
AlignCenter);
|
AlignCenter);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
char* message = (char*)furi_hal_rtc_get_fault_data();
|
char* message = (char*)furi_hal_rtc_get_fault_data();
|
||||||
popup_set_text(popup, message, 60, 37 + STATUS_BAR_Y_SHIFT, AlignCenter, AlignCenter);
|
popup_set_text(popup, message, 60, 37 + STATUS_BAR_Y_SHIFT, AlignCenter, AlignCenter);
|
||||||
popup_set_callback(popup, desktop_scene_fault_callback);
|
popup_set_callback(popup, desktop_scene_fault_callback);
|
||||||
view_dispatcher_switch_to_view(desktop->view_dispatcher, DesktopViewIdHwMismatch);
|
view_dispatcher_switch_to_view(desktop->view_dispatcher, DesktopViewIdHwMismatch);
|
||||||
|
free(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool desktop_scene_fault_on_event(void* context, SceneManagerEvent event) {
|
bool desktop_scene_fault_on_event(void* context, SceneManagerEvent event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user