[FL-1151] Power: Low Battery power off routine (#418)

This commit is contained in:
あく
2021-04-19 19:26:25 +03:00
committed by GitHub
parent 8ada9b817b
commit 202673aed1
5 changed files with 109 additions and 36 deletions

View File

@@ -6,7 +6,7 @@
#include <gui/canvas.h>
#include <gui/view.h>
typedef enum { PowerViewInfo, PowerViewDialog } PowerView;
typedef enum { PowerViewInfo, PowerViewDialog, PowerViewOff } PowerView;
typedef struct {
float current_charger;
@@ -26,4 +26,11 @@ typedef struct {
uint8_t health;
} PowerInfoModel;
typedef struct {
uint32_t poweroff_tick;
bool battery_low;
} PowerOffModel;
void power_info_draw_callback(Canvas* canvas, void* context);
void power_off_draw_callback(Canvas* canvas, void* context);