mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-24 05:23:06 +00:00
5dbfe3d90a
* dolphin_srv: save timestamp on deed; desktop_srv minor refactoring * dolphin_srv timegated butthurt increse, desktop refactoring * desktop app: update debug screen * remove debug logging * increasing icounter affects butthurt value * Dolphin: correct error message on DolphinStore load Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
54 lines
No EOL
1.3 KiB
C
54 lines
No EOL
1.3 KiB
C
#pragma once
|
|
|
|
#include <gui/gui_i.h>
|
|
#include <gui/view.h>
|
|
#include <gui/canvas.h>
|
|
#include <gui/elements.h>
|
|
#include <furi.h>
|
|
#include <storage/storage.h>
|
|
#include <time.h>
|
|
|
|
typedef enum {
|
|
DesktopDebugEventDeed,
|
|
DesktopDebugEventWrongDeed,
|
|
DesktopDebugEventSaveState,
|
|
DesktopDebugEventExit,
|
|
} DesktopDebugEvent;
|
|
|
|
typedef struct DesktopDebugView DesktopDebugView;
|
|
|
|
typedef void (*DesktopDebugViewCallback)(DesktopDebugEvent event, void* context);
|
|
|
|
// Debug info
|
|
typedef enum {
|
|
DesktopViewStatsFw,
|
|
DesktopViewStatsBoot,
|
|
DesktopViewStatsMeta,
|
|
DesktopViewStatsTotalCount,
|
|
} DesktopViewStatsScreens;
|
|
|
|
struct DesktopDebugView {
|
|
View* view;
|
|
DesktopDebugViewCallback callback;
|
|
void* context;
|
|
};
|
|
|
|
typedef struct {
|
|
uint32_t icounter;
|
|
uint32_t butthurt;
|
|
uint64_t timestamp;
|
|
DesktopViewStatsScreens screen;
|
|
} DesktopDebugViewModel;
|
|
|
|
void desktop_debug_set_callback(
|
|
DesktopDebugView* debug_view,
|
|
DesktopDebugViewCallback callback,
|
|
void* context);
|
|
|
|
View* desktop_debug_get_view(DesktopDebugView* debug_view);
|
|
|
|
DesktopDebugView* desktop_debug_alloc();
|
|
void desktop_debug_free(DesktopDebugView* debug_view);
|
|
|
|
void desktop_debug_get_dolphin_data(DesktopDebugView* debug_view);
|
|
void desktop_debug_reset_screen_idx(DesktopDebugView* debug_view); |