mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-16 04:24:45 -07:00
Merge branch 'dev' of https://github.com/ClaraCrazy/Flipper-Xtreme into dev
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <furi_hal.h>
|
||||
|
||||
#include "../desktop_i.h"
|
||||
#include "../../../settings/desktop_settings/desktop_settings_app.h"
|
||||
|
||||
#define DesktopFaultEventExit 0x00FF00FF
|
||||
|
||||
@@ -12,20 +13,36 @@ void desktop_scene_fault_callback(void* context) {
|
||||
void desktop_scene_fault_on_enter(void* context) {
|
||||
Desktop* desktop = (Desktop*)context;
|
||||
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
Popup* popup = desktop->hw_mismatch_popup;
|
||||
popup_set_context(popup, desktop);
|
||||
popup_set_header(
|
||||
popup,
|
||||
"Slut passed out\n but is now back",
|
||||
60,
|
||||
14 + STATUS_BAR_Y_SHIFT,
|
||||
AlignCenter,
|
||||
AlignCenter);
|
||||
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,
|
||||
"Slut passed out\n but is now back",
|
||||
60,
|
||||
14 + STATUS_BAR_Y_SHIFT,
|
||||
AlignCenter,
|
||||
AlignCenter);
|
||||
}
|
||||
|
||||
|
||||
char* message = (char*)furi_hal_rtc_get_fault_data();
|
||||
popup_set_text(popup, message, 60, 37 + STATUS_BAR_Y_SHIFT, AlignCenter, AlignCenter);
|
||||
popup_set_callback(popup, desktop_scene_fault_callback);
|
||||
view_dispatcher_switch_to_view(desktop->view_dispatcher, DesktopViewIdHwMismatch);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool desktop_scene_fault_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
@@ -47,32 +47,30 @@ static void render_callback(Canvas* canvas, void* ctx) {
|
||||
char mood_str[32];
|
||||
uint8_t mood = 0;
|
||||
|
||||
if(settings->sfw_mode)
|
||||
{
|
||||
if(stats->butthurt <= 4) {
|
||||
mood = 0;
|
||||
snprintf(mood_str, 20, "Mood: Happy");
|
||||
} else if(stats->butthurt <= 9) {
|
||||
mood = 1;
|
||||
snprintf(mood_str, 20, "Mood: Okay");
|
||||
} else {
|
||||
mood = 2;
|
||||
snprintf(mood_str, 20, "Mood: Angry");
|
||||
}}
|
||||
else
|
||||
{
|
||||
if(stats->butthurt <= 4) {
|
||||
mood = 0;
|
||||
snprintf(mood_str, 20, "Status: Wet");
|
||||
} else if(stats->butthurt <= 9) {
|
||||
mood = 1;
|
||||
snprintf(mood_str, 20, "Status: Horny");
|
||||
} else {
|
||||
mood = 2;
|
||||
snprintf(mood_str, 20, "Status: Desperate");
|
||||
}
|
||||
if(settings->sfw_mode) {
|
||||
if(stats->butthurt <= 4) {
|
||||
mood = 0;
|
||||
snprintf(mood_str, 20, "Mood: Happy");
|
||||
} else if(stats->butthurt <= 9) {
|
||||
mood = 1;
|
||||
snprintf(mood_str, 20, "Mood: Okay");
|
||||
} else {
|
||||
mood = 2;
|
||||
snprintf(mood_str, 20, "Mood: Angry");
|
||||
}
|
||||
} else {
|
||||
if(stats->butthurt <= 4) {
|
||||
mood = 0;
|
||||
snprintf(mood_str, 20, "Status: Wet");
|
||||
} else if(stats->butthurt <= 9) {
|
||||
mood = 1;
|
||||
snprintf(mood_str, 20, "Status: Horny");
|
||||
} else {
|
||||
mood = 2;
|
||||
snprintf(mood_str, 20, "Status: Desperate");
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
uint32_t xp_progress = 0;
|
||||
uint32_t xp_to_levelup = dolphin_state_xp_to_levelup(stats->icounter);
|
||||
uint32_t xp_above_last_levelup = dolphin_state_xp_above_last_levelup(stats->icounter);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "../power_settings_app.h"
|
||||
#include "../../desktop_settings/desktop_settings_app.h"
|
||||
|
||||
void power_settings_scene_power_off_dialog_callback(DialogExResult result, void* context) {
|
||||
furi_assert(context);
|
||||
@@ -10,9 +11,16 @@ void power_settings_scene_power_off_on_enter(void* context) {
|
||||
PowerSettingsApp* app = context;
|
||||
DialogEx* dialog = app->dialog;
|
||||
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
dialog_ex_set_header(dialog, "Turn Off Device?", 64, 2, AlignCenter, AlignTop);
|
||||
dialog_ex_set_text(
|
||||
dialog, " I will be\nwaiting for\n you master", 78, 16, AlignLeft, AlignTop);
|
||||
if (settings->sfw_mode) {
|
||||
dialog_ex_set_text(dialog, " I will be\nwaiting for\n you here", 78, 16, AlignLeft, AlignTop);
|
||||
}
|
||||
else {
|
||||
dialog_ex_set_text(dialog, " I will be\nwaiting for\n you master", 78, 16, AlignLeft, AlignTop);
|
||||
}
|
||||
dialog_ex_set_icon(dialog, 21, 13, &I_Cry_dolph_55x52);
|
||||
dialog_ex_set_left_button_text(dialog, "Back");
|
||||
dialog_ex_set_right_button_text(dialog, "OFF");
|
||||
@@ -20,6 +28,7 @@ void power_settings_scene_power_off_on_enter(void* context) {
|
||||
dialog_ex_set_context(dialog, app);
|
||||
|
||||
view_dispatcher_switch_to_view(app->view_dispatcher, PowerSettingsAppViewDialog);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool power_settings_scene_power_off_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
Reference in New Issue
Block a user