Remove xtreme/private.h and rewire some things

This commit is contained in:
Willy-JL
2023-07-06 01:28:28 +02:00
parent dc4f264bcb
commit 2e7d074c0c
11 changed files with 28 additions and 25 deletions

View File

@@ -120,9 +120,7 @@ bool xtreme_app_apply(XtremeApp* app) {
if(app->show_slideshow) {
callback_reboot(NULL);
}
if(app->require_reboot) {
} else if(app->require_reboot) {
popup_set_header(app->popup, "Rebooting...", 64, 26, AlignCenter, AlignCenter);
popup_set_text(app->popup, "Applying changes...", 64, 40, AlignCenter, AlignCenter);
popup_set_callback(app->popup, callback_reboot);

View File

@@ -20,6 +20,7 @@
#include <lib/subghz/subghz_setting.h>
#include <flipper_application/flipper_application.h>
#include <notification/notification_app.h>
#include <power/power_service/power.h>
#include <rgb_backlight.h>
#include <m-array.h>
#include <namespoof.h>

View File

@@ -11,6 +11,7 @@
#include <loader/firmware_api/firmware_api.h>
#include <toolbox/stream/file_stream.h>
#include <core/dangerous_defines.h>
#include <gui/icon_i.h>
#define TAG "Loader"
#define LOADER_MAGIC_THREAD_VALUE 0xDEADBEEF

View File

@@ -25,17 +25,6 @@ typedef enum {
PowerEventTypeBatteryLevelChanged,
} PowerEventType;
typedef enum {
BatteryIconOff,
BatteryIconBar,
BatteryIconPercent,
BatteryIconInvertedPercent,
BatteryIconRetro3,
BatteryIconRetro5,
BatteryIconBarPercent,
BatteryIconCount,
} BatteryIcon;
typedef union {
uint8_t battery_level;
} PowerEventData;

View File

@@ -327,7 +327,10 @@ Function,-,SK6805_set_led_color,void,"uint8_t, uint8_t, uint8_t, uint8_t"
Function,-,SK6805_update,void,
Function,-,SystemCoreClockUpdate,void,
Function,-,SystemInit,void,
Function,+,XTREME_ASSETS_FREE,void,
Function,+,XTREME_ASSETS_LOAD,void,
Function,+,XTREME_SETTINGS,XtremeSettings*,
Function,-,XTREME_SETTINGS_LOAD,void,
Function,+,XTREME_SETTINGS_SAVE,void,
Function,-,_Exit,void,int
Function,-,__assert,void,"const char*, int, const char*"
1 entry status name type params
327 Function - SK6805_update void
328 Function - SystemCoreClockUpdate void
329 Function - SystemInit void
330 Function + XTREME_ASSETS_FREE void
331 Function + XTREME_ASSETS_LOAD void
332 Function + XTREME_SETTINGS XtremeSettings*
333 Function - XTREME_SETTINGS_LOAD void
334 Function + XTREME_SETTINGS_SAVE void
335 Function - _Exit void int
336 Function - __assert void const char*, int, const char*

View File

@@ -13,7 +13,8 @@
#include <dolphin/helpers/dolphin_state.h>
#include <applications/main/u2f/u2f_data.h>
#include <applications/main/archive/helpers/archive_favorites.h>
#include <xtreme/private.h>
#include <namespoof.h>
#include <xtreme.h>
#define TAG "Flipper"

View File

@@ -1,6 +1,6 @@
#include "xtreme.h"
#include "private.h"
#include <furi_hal.h>
#include <gui/icon_i.h>
#include <assets_icons.h>
#include <storage/storage.h>
#include <core/dangerous_defines.h>

View File

@@ -3,3 +3,5 @@
#define NAMESPOOF_HEADER "Flipper Name File"
#define NAMESPOOF_VERSION 1
#define NAMESPOOF_PATH EXT_PATH("dolphin/name.txt")
void NAMESPOOF_INIT();

View File

@@ -1,6 +0,0 @@
#pragma once
void NAMESPOOF_INIT();
void XTREME_SETTINGS_LOAD();
void XTREME_ASSETS_LOAD();
void XTREME_ASSETS_FREE();

View File

@@ -1,5 +1,4 @@
#include "xtreme.h"
#include "private.h"
#include <furi_hal.h>
#include <flipper_format/flipper_format.h>

View File

@@ -1,7 +1,7 @@
#pragma once
#include <gui/icon_i.h>
#include <power/power_service/power.h>
#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
@@ -12,6 +12,17 @@ extern "C" {
#define XTREME_APPS_PATH CFG_PATH("xtreme_apps.txt")
#define XTREME_ASSETS_PACK_NAME_LEN 32
typedef enum {
BatteryIconOff,
BatteryIconBar,
BatteryIconPercent,
BatteryIconInvertedPercent,
BatteryIconRetro3,
BatteryIconRetro5,
BatteryIconBarPercent,
BatteryIconCount,
} BatteryIcon;
typedef struct {
bool is_nsfw; // TODO: replace with packs text support
@@ -46,9 +57,13 @@ typedef struct {
uint32_t charge_cap;
} XtremeSettings;
void XTREME_SETTINGS_LOAD();
void XTREME_SETTINGS_SAVE();
XtremeSettings* XTREME_SETTINGS();
void XTREME_ASSETS_LOAD();
void XTREME_ASSETS_FREE();
#ifdef __cplusplus
}
#endif